On Nov 30, 2012, at 7:42 AM, Florian Apolloner <f.apollo...@gmail.com> wrote:

> Hi Tyler,
> 
> On Wednesday, November 28, 2012 6:24:57 PM UTC+1, Tyler Ball wrote:
> - 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.
> 
> Django namespaces it's jquery under django.jquery, there should be no issue 
> including an up2date version for your projects. Django probably will never 
> keep up with jquery's release cycle.

I can vouch for this.  It would be nice to keep it more up-to-date, but it is 
namespaced in a way that keeps it from bother other parts of the code that 
require a more modern version of jQuery.  I'm currently using 1.7.x in my admin 
alongside Django's jQuery 1.4 version.


>  - 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.

Agreed that this code is not a good as it could be.  Having created a custom 
admin on top of admin_tools[1], I've come across a lot of pain points and have 
slowly (more slowly than I'd like) been refactoring bits of the admin JS into 
something that's more extensible.[2]

As for your actual idea, I'd have to see it to fully understand what you're 
proposing here.  Could you mock up some pseudo code that shows what you're 
trying to accomplish?  It doesn't need to be complex, just something that shows 
the order of execution using comments and what would be called.

-T

[1]: https://github.com/tswicegood/pops
[2]: 
https://github.com/django/django/commit/4754f122dd9b41fc9b2dee3fa74e19fc384237ab

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
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