-
Notifications
You must be signed in to change notification settings - Fork 45
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
Providing base_site.html
breaks compatibility with end-user projects.
#30
Comments
The other way is to add template loader in |
@mrmachine yeah you probably right -- I didn't find any good solution how to fix this problem. @andybak seems I have to roll back latest change about adding css class to the admin body because it breaks user's custom |
I might be missing something but what's the issue here? If you're using Flat theme and not overriding base_site.html: no problem If you're using Flat theme and you are overriding base_site.html: Ensure correct ordering in INSTALLED_APPS and include {% block bodyclass %}flat-theme{% endblock %} in your template. |
@andybak The issue is that flat-theme is no longer a drop in replacement for the default admin theme. It requires you to alter your existing We have a pluggable app that provides a It's not possible for two pluggable apps to override the same Django template even if each only overrides different blocks. |
I've got myself a touch confused here. Is this correct?: "The only reason flat requires base_site.html is to add a class to the body tag" (as requested in #26 ) If so - then I agree - it's more trouble than it's worth and users can add their own class. HOWEVER - some consensus is required on the correct class to add so that 3rd party apps can all use the same class to target the flat theme. So - would it be acceptable to add a note to the docs to this effect?:
|
That sounds right to me. |
As mentioned here: 49c9b05
This change probably breaks compatibility with any existing project that defines their own
admin/base_site.html
template, which I believe is the recommended way for people to extend the Django admin template without duplicatingbase.html
.Changing the order of
INSTALLED_APPS
won't help. It's either ourbase_site.html
or yours.Is there another way you can implement
django-flat-theme
without adding theflat-theme
class directly to thebody
tag in this template? Maybedjango-flat-theme
can just live without it? Or you could duplicate thebase.html
template. That would be ideal for people wanting to usedjango-flat-theme
with their own projects, as it would remain more of a drop in replacement.The text was updated successfully, but these errors were encountered: