22👍
✅
“At the same place” as yoga/index.html
means that the template is actually yoga/base.html
.
18👍
Assuming TEMPLATE_DIRS contains /home/mo/python/django/templates/
, without the .../yoga/
, so you need to:
move base.html
into /home/mo/python/django/templates/
OR
write {% extends "yoga/base.html" %}
in your template
- [Django]-Django – No module named _sqlite3
- [Django]-Django models: mutual references between two classes and impossibility to use forward declaration in python
- [Django]-Allowing RabbitMQ-Server Connections
- [Django]-Disabled field is not passed through – workaround needed
- [Django]-Django composite unique on multiple model fields
- [Django]-Django count RawQuerySet
1👍
Base.html file must be located at the base of templates folder to use ‘ base.html ‘ , if located in another folder such as: templates / home / base.html
, then you must specify the path using
{ % Extends ' home / base.html '% }
- [Django]-How to add new languages into Django? My language "Uyghur" or "Uighur" is not supported in Django
- [Django]-Create a field whose value is a calculation of other fields' values
- [Django]-Django/DRF – 405 Method not allowed on DELETE operation
Source:stackexchange.com