TemplateDoesNotExist

i am at Django Fundamentals: 10-Using Templates. I followed everything that Mosh did, but for some reason, I am getting a TemplateDoesNotExist error.

Internal Server Error: /playground/hello/
Traceback (most recent call last):
File “/Users/sai/.local/share/virtualenvs/storefront-SiQ-GJjJ/lib/python3.9/site-packages/django/core/handlers/exception.py”, line 55, in inner
response = get_response(request)
File “/Users/sai/.local/share/virtualenvs/storefront-SiQ-GJjJ/lib/python3.9/site-packages/django/core/handlers/base.py”, line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/Users/sai/Desktop/storefront/storefront/playground/views.py”, line 6, in say_hello
return render(request,‘hello.html’)
File “/Users/sai/.local/share/virtualenvs/storefront-SiQ-GJjJ/lib/python3.9/site-packages/django/shortcuts.py”, line 24, in render
content = loader.render_to_string(template_name, context, request, using=using)
File “/Users/sai/.local/share/virtualenvs/storefront-SiQ-GJjJ/lib/python3.9/site-packages/django/template/loader.py”, line 61, in render_to_string
template = get_template(template_name, using=using)
File “/Users/sai/.local/share/virtualenvs/storefront-SiQ-GJjJ/lib/python3.9/site-packages/django/template/loader.py”, line 19, in get_template
raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: hello.html
[26/Aug/2022 14:20:26] “GET /playground/hello/ HTTP/1.1” 500 74063

Screen Shot 2022-08-27 at 12.30.57 am|690x431

1 Like

Is your template file saving as html or as Django? A good way to check is to look at the icon next to the file. If it doesn’t show the html brackets then its saving wrong. Go in setting-> Files:Associations and add an item value pair as follows :
Key: *.html
Value: html

Let me know if this helps!

thanks bro i fixed it but now i got error near the sql client installation , can you help it ?