Opened 19 years ago
Closed 19 years ago
#2468 closed defect (invalid)
app_directory template loader expects redundant path
Description ¶
When using the app_directory template loader, the loader seems to expect app_name/templates/app_name/template.html instead of app_name/template/template.html
The second app_name is redundant and should be removed from the default search path. The documentation example at http://www.djangoproject.com/documentation/templates_python/ indicates that calling get_template("template.html") will not look for the second app_name but it does.
Note:
See TracTickets
for help on using tickets.
The app_directory loader does not append an extra app_name to the path (as can be seen from django/template/loaders/app_directories.py, lines 23 and 32). The get_template() function does not append anything extra, either. So this looks to be working as documented.
You might want to post an example to the django-users mailing list if you are having trouble getting this to work. Include your settings.py, directory structure and the template code you are trying to run.