Hi Djangonauts,

I'm a frontend developer at a Django shop and lately we have doing a lot of 
projects that customize the Django admin interface. Adding confirmation 
popups, custom interface for certain types of content, etc. One very 
frustrating part of this has been overriding or extending the behaviour of 
a lot of the included Javascript. I'm starting this thread to cull the 
opinions of the Django community about what they'd like to see from the 
Admin Javascript. I'll start with some pain points, and some ideas I have 
to improve it:

- jQuery: Inlines are written as a jQuery plugin, DateTime and i18n are 
written without jQuery. The version of jQuery included is 1.4.2, which is 
~3 years old. Do we want to have jQuery in this project? I think Django 
should include it, as it helps solve a lot of browser inconsistencies and 
is familiar to all JS devs. But if so, we should try to keep it up to date.

- Not extensible: Behaviour for the jQuery plugins are defined in template 
blocks which are somewhat easy to customize, while DateTimeShortcuts uses 
href="javascript:void" links generated dynamically, which are nearly 
impossible to override. I'd like to rewrite the Admin JS to use a Backbone 
like structure, where all the necessary JS is initialized as an instance 
from one place by calling `new` and a .extend() function can be used where 
the developer wants to customize behaviour. This change would be pretty 
radical but I feel it would be for the better.

I'm eager to start working on pull requests for some of these changes 
(smaller first) but I wanted to take the pulse of django-developers first 
and see how they felt about it.

Thanks,

-Tyler

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-developers/-/DDx51WNU-RIJ.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to