Opened 12 years ago
Last modified 12 years ago
#21948 closed Cleanup/optimization
Docs on extending admin templates should mention TEMPLATE_LOADERS — at Version 2
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Documentation | Version: | 1.6 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
The docs at https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates should mention that you *must* set:
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
...
)
and that django.template.loaders.filesystem.Loader must come before django.template.loaders.app_directories.Loader.
This confused me for a long time, mainly because the default settings.py created with django-admin.py startproject myproject doesn't contain any of those settings.
(P.S. you also need to set TEMPLATE_DIRS of course. This is mentioned in the docs linked above, but I think it could be clearer)
Thanks
Change History (2)
comment:1 by , 12 years ago
| Component: | Uncategorized → Documentation |
|---|
comment:2 by , 12 years ago
| Description: | modified (diff) |
|---|---|
| Easy pickings: | set |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Cleanup/optimization |
These are the default loaders so that's why it's probably not mentioned.