Answer the question
In order to leave comments, you need to log in
How is this error read and resolved?
Internal Server Error: /blog/post/new-slug/
Traceback (most recent call last):
File "C:\Users\Admin\Desktop\dj\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\Admin\Desktop\dj\venv\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\Admin\Desktop\dj\venv\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\Admin\Desktop\dj\app\blogengine\blog\views.py", line 13, in post_detail
return render (request , 'blog/post_detail_html', context={'post': post})
File "C:\Users\Admin\Desktop\dj\venv\lib\site-packages\django\shortcuts.py", line 36, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "C:\Users\Admin\Desktop\dj\venv\lib\site-packages\django\template\loader.py", line 61, in render_to_string
template = get_template(template_name, using=using)
File "C:\Users\Admin\Desktop\dj\venv\lib\site-packages\django\template\loader.py", line 19, in get_template
raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: blog/post_detail_html
[20/Jun/2019 01:11:55] "GET /blog/post/new-slug/ HTTP/1.1" 500 78339
Answer the question
In order to leave comments, you need to log in
The error is that there is no blog/post_detail
HTML template.
The solution depends on where exactly the error occurred. From the fact that the template itself is not in the folder, to an error in urls.py
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question