How To Use 2 Different Change_list.html For 2 Applications In The Same Django Project
I have 2 applications in the django project. I want to add different widgets in the change_list.html for the 2 different applications. In settings.py, after adding the change_list.
Solution 1:
Read the section on overriding admin templates: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates (more specifically https://docs.djangoproject.com/en/dev/ref/contrib/admin/#templates-which-may-be-overridden-per-app-or-model)
Place your change_list.html
in admin/application1
in one of the folders parsed by TEMPLATE_DIRS
or one of the template loaders and that template will be served only for application1
.
Your current code is always telling django to prioritize matches on the first path over the second.
Post a Comment for "How To Use 2 Different Change_list.html For 2 Applications In The Same Django Project"