Answer the question
In order to leave comments, you need to log in
How to include a template from a required app in Django?
Good afternoon, actually there is a project with such file structure
project/
apps/
app1/
templates/
list.html
app2/
templates/
list.html
app3/
templates/
index.html
Answer the question
In order to leave comments, you need to log in
No, the search will be performed in the order the apps are listed in INSTALLED_APPS
and will stop as soon as the first match is found. The standard way is to create subdirectories in templates with the same name as the application:
app1/
templates/
app1/
list.html
app2/
templates/
app2/
list.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question