I got a bit confused, because when I use the generic ListView class, Django is looking for “appname/objectname_list.html” inside the “appname/templates” folder. This results in:
appname/templates/appname/objectname_list.html
If I supply “template_name”, it does not require the subfolder inside the templates folder anymore.
Why doesn’t it find the objectname_list.html inside the “templates” folder like before in 1.3 ? Did I configure something wrong or did they change the place where I’m supposed to put my templates as well ? In 1.3 I used to place template html files inside “appname/templates” directly instead of using a subfolder.
For me it does not make sense to use another subfolder with the name of the app, where the templates folder is already in. Or am I missing something useful ?
I could not find anything about it in the release notes.
I don’t think this is 1.4 specific. If you will want your template in a subfolder, specify
template_name = 'subfolde/template.html'Regarding template dirs, from the docs:
So the actual dir is:
This helps you keep everything inside the app folder and does not require you to configure anything,
This also means that if you have apps
foo,barandbaz, you can still have onetemplatesdir under one of the apps: