You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem with overriding admin templates is that if I want to use your app alongside another one that also has a custom changelist template I'm a bit stuck. There's no nice way round this - I usually have to pick the one that makes the smallest change and copy those changes to a template in my own app so I can then extend the other app's template.
In the case of your app - it looks like all you do to the changelist, is add in some javascript and css. This could be accomplished less intrusively (whilst still allowing the current approach in situations where it isn't problematic).
This would also make it easier for OrderableAdmin to be used as a mixin rather than a replacement for ModelAdmin.
The text was updated successfully, but these errors were encountered:
Hi @andybak, thanks for the report, and sorry for the inconvenience caused.
Having had a quick look at the custom templates, I suspect you're right that templates are not the right solution. We may be able to use the class Media to provide the css and javascript.
I'd also like these templates removed as I'm worried about them slipping out of sync with django.
Ideally, I'd like to get front-end tests (#30) to really have confidence in this. It's not strictly necessary of course.
The problem with overriding admin templates is that if I want to use your app alongside another one that also has a custom changelist template I'm a bit stuck. There's no nice way round this - I usually have to pick the one that makes the smallest change and copy those changes to a template in my own app so I can then extend the other app's template.
In the case of your app - it looks like all you do to the changelist, is add in some javascript and css. This could be accomplished less intrusively (whilst still allowing the current approach in situations where it isn't problematic).
This would also make it easier for OrderableAdmin to be used as a mixin rather than a replacement for ModelAdmin.
The text was updated successfully, but these errors were encountered: