#10128: widgets Media class has an initialisation error (maybe)
-------------------------------------+--------------------------------------
 Reporter:  peter2108                |       Owner:  nobody    
   Status:  new                      |   Milestone:            
Component:  Forms                    |     Version:  1.0       
 Keywords:  Media widget initialise  |       Stage:  Unreviewed
Has_patch:  0                        |  
-------------------------------------+--------------------------------------
 The django.forms.widgets Media instance can be initialised in two ways,
 either by supplying a dictionary of media arguments or by supplying an
 existing Media instance via the 'media' keyword. Django does not AFAICT
 use this second method at all. Anyway it does not work. The offending
 code:
         {{{
         if media:
             media_attrs = media.__dict__
         else:
             media_attrs = kwargs
         }}}

 {{{media.__dict__}}} gives a dictionary keyed by '_css' and '_js' whereas
 the subsequent code looks for 'css' and 'js' keys. Of course the
 (non-)role of the media keyword might be something else altogether in
 which case close the bug. Otherwise one could have {{{media_attrs =
 {'css':media._css, 'js':media._js}}}} at line two or even change the
 attributes _css and _js to be the same as the MEDIA_TYPES.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10128>
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