P
P
pyth12020-12-11 17:47:46
Django
pyth1, 2020-12-11 17:47:46

How to start a server in Django?

Error when trying to start server----
'''
Internal Server Error: /
Traceback (most recent call last):
File "C:\Users\ramis\PycharmProjects\djangoProject1\venv\lib\site-packages\django\core \handlers\exception.py",
line 47, in inner
response = get_response(request)
File "C:\Users\ramis\PycharmProjects\djangoProject1\venv\lib\site-packages\django\core\handlers\base.py" , line
179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ramis\PycharmProjects\djangoProject1\main\views.py", line 6, in index1
return render(request, ' main/index1')
File "C:\Users\ramis\PycharmProjects\djangoProject1\venv\lib\site-packages\django\shortcuts.py", line 19, in r
ender
content = loader.render_to_string(template_name, context, request, using=using)
File "C:\Users\ramis\PycharmProjects\djangoProject1\venv\lib\site-packages\django\template\loader.py", line 61
, in render_to_string
template = get_template(template_name, using=using)
File "C:\ Users\ramis\PycharmProjects\djangoProject1\venv\lib\site-packages\django\template\loader.py", line 19
, in get_template
raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: main/index1
[11/Dec/2020 17:43:10] "GET / HTTP/1.1" 500 74863
Not Found: /favicon.ico
[11/Dec/2020 17:43:10] "GET /favicon.ico HTTP/1.1" 404 2127
'''

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
EastJesus, 2020-12-11
@EastJesus

Your error speaks for itself: TemplateDoesNotExist , that is, the template was not found

P
pyth1, 2020-12-12
@pyth1

An error was found. The reason for it was that when the Django project was created, there was already a templates folder, and I created a new one and did not use the created folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question