Opened 12 years ago

Closed 12 years ago

#2468 closed defect (invalid)

app_directory template loader expects redundant path

Reported by: anonymous Owned by: Adrian Holovaty
Component: Template system Version: master
Severity: normal Keywords: app_directory template loader
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


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 indicates that calling get_template("template.html") will not look for the second app_name but it does.

Change History (1)

comment:1 Changed 12 years ago by Malcolm Tredinnick

Resolution: invalid
Status: newclosed

The app_directory loader does not append an extra app_name to the path (as can be seen from django/template/loaders/, 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, directory structure and the template code you are trying to run.

Note: See TracTickets for help on using tickets.
Back to Top