django-orderable icon indicating copy to clipboard operation
django-orderable copied to clipboard

Is there a compelling need for the custom changelist template?

Open andybak opened this issue 10 years ago • 1 comments

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.

andybak avatar Jun 21 '15 15:06 andybak

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.

meshy avatar Oct 06 '15 09:10 meshy