Opened 3 years ago

Closed 3 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 Changed 3 years ago by Aymeric Augustin

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

See also #21018.

comment:2 Changed 3 years ago by Benjamin.Encz@…

Needs documentation: set

For now update of tutorial would be sufficient.

comment:3 Changed 3 years ago by Tim Graham

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