-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should theming be overriding base.html the way it does? #21
Comments
Within my own projects I've been using django-apptemplates: https://pypi.python.org/pypi/django-apptemplates/ This adds a template loader that namespaces 'extends' to a specific app. So I can do:
in my template and override only the blocks I need without getting a circular 'extends' loop. This allows me to reduce the copy+paste from Django's base.html and means I'm much less likely to cause breakage when Django changes it's own html. django-apptemplates is very small and simple so if another dependency is an issue we could include it in it's entirety. |
Here's a similar alternative to apptemplate: https://github.com/stephenmcd/django-overextends |
Yep, maintaining admin templates has always been a problem. |
I spent an hour today working out why several Django 1.8 changes weren't showing up.
I'd used 'theming' to fix some CSS and it overrides base.html. So we need to update the included base.html to match the Django version
This means maintaining a different base.html for each Django version and figure out how to load the correct one for a given install.
Considering the only reasons for overriding it are to add a single tag loader and a tag that loads some CSS it strikes me that this is too high a price to pay.
There's also the problem that only one app can override base.html - if another app that tries the same technique then it's down to the ordering of INSTALLED_APPS
This can be partially solved with documentation - tell people what to put in their base.html if they need to - but it gets messy.
I wonder if this could be improved in Django core. I'm still mulling it over but I thought I'd start a conversation.
The text was updated successfully, but these errors were encountered: