#15231: Admin DateTimeShortcuts + Inlines performance
------------------------------------------------+---------------------------
               Reporter:  fabianbuechler        |         Owner:  nobody
                 Status:  new                   |     Milestone:        
              Component:  django.contrib.admin  |       Version:  SVN   
             Resolution:                        |      Keywords:        
           Triage Stage:  Accepted              |     Has patch:  1     
    Needs documentation:  0                     |   Needs tests:  0     
Patch needs improvement:  1                     |  
------------------------------------------------+---------------------------

Comment (by fabianbuechler):

 Replying to [comment:4 airstrike]:
 > I have indeed overwritten the base.html template. Actually, I just
 patched my own app to see if it would work, rather than starting a new app
 from the patch. Perhaps the case is that it's not particularly clear to me
 (and maybe other users) how to set admin_media_prefix The Right Way.
 window.__admin_media_prefix__ is what I found googling around.

 Just for clarification:
 The {{{admin_media_prefix}}} is being set in the {{{base.html}}} template,
 because that is the least likely to be overwritten (usually it is just
 being extended).
 It is necessary to set this variable in a Django template, because there
 you can create the link between the variables known in Python code and the
 JavaScript which knows nothing about these variables.

 Since I've rewritten the DateTimeShortcuts thingy using jQuery, I've also
 changed the way the {{{admin_media_prefix}}} variable is stored from
 {{{window.__admin_media_prefix__}}} to
 {{{jQuery('body').data('admin_media_prefix')}}}.

 Maybe this would require some backwards compatibility fix - what do you
 think?

 > On a side note, +1 on making the move to jQuery UI. Readability and
 flexibility are two key items that come to mind as strong arguments in
 favor of that decision.

 I'd vote for that too, but I'll better bring that topic up in the dev
 mailinglist some day.
 The jQuery UI datepicker is propably far more advanced by now (in terms of
 browser compatibility, keyboard navigation, etc.) and the time-picker
 widget is far less useful than it could possibly be, imho.

 > ''(Meanwhile, I'd love to use jQuery UI even if it never makes it to
 Django officially, so if you happened to make one for yourself (that you
 didn't submit as patch), please share! My javascript skills are lackluster
 at best, so adapting your code would take hours that I can't afford to
 spend at the moment.)''

 I have not integrated jQuery UI by now because I wanted to make the move
 to jQuery first and separately, as I thought that would give the patch
 greater changes to be accepted. :)
 Once a descision has been made to integrate it, I would definitely like to
 help.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15231#comment:5>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to