Opened 11 years ago

Closed 11 years ago

#21527 closed Uncategorized (invalid)

Application order effects template loading/overriding

Reported by: Benjamin.Encz@… Owned by: nobody
Component: Documentation Version: 1.6
Severity: Normal Keywords:
Cc: Benjamin.Encz@… Triage Stage: Unreviewed
Has patch: no Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I am not sure if it was mentioned in the documentation, but it is necessary to list the custom app before the django apps in settings.py to make the overriding of the admin template work:

INSTALLED_APPS = (

'polls',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

)

Someone else had this problem before, which saved me a lot of time here:
http://stackoverflow.com/questions/11793890/custom-django-admin-templates-not-working

Maybe it would be worth pointing that out in the documentation?

Change History (3)

comment:1 by Aymeric Augustin, 11 years ago

See also #21018.

comment:2 by Benjamin.Encz@…, 11 years ago

Needs documentation: set

For now update of tutorial would be sufficient.

comment:3 by Tim Graham, 11 years ago

Resolution: invalid
Status: newclosed

If you re-read that section of the tutorial carefully, you'll note that you need to put the admin custom templates in the *project's* template folder, not the polls/templates folder.

There is already #20914 open to clarify the ordering issue in the general case, so I'm going to close this ticket.

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