error extending base template

41 views
Skip to first unread message

Namanya Daniel

unread,
Oct 10, 2022, 11:11:38 AM10/10/22
to Django users
hello, someone help me out. am new to django and i face an issue with templates extending base.html

i have created a base.html template which is basically a skeleton for other templates, they are all in templates/another directory but when i use {%extends 'base.html'%}  I get this error... thanks in advance


Request Method:
GET
Request URL:
http://127.0.0.1:8000/
Django Version:
4.1.2
Exception Type:
TemplateDoesNotExist
Exception Value:
base.html

ASAMOAH EMMANUEL

unread,
Oct 10, 2022, 4:14:28 PM10/10/22
to django...@googlegroups.com
Make sure the template directory is located in the app directory or if it is in a different directory, ensure the location is specified at the template section  in the settings.py file

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b46cebb4-fca2-49b8-a836-309a2c4a4024n%40googlegroups.com.

Chukwudi Onwusa

unread,
Oct 11, 2022, 10:51:51 AM10/11/22
to django...@googlegroups.com
Give space in the html template tag
I mean {% extends 'base.html' %}
But if the base is nested inside a directory inside the template directory pls name the '../base.html' according.
Thanks
Hope it will be help.

--
Reply all
Reply to author
Forward
0 new messages