#13978: Allow inline js/css in forms.Media
-----------------------+----------------------------------------------------
 Reporter:  nathforge  |       Owner:  nobody    
   Status:  new        |   Milestone:            
Component:  Forms      |     Version:  SVN       
 Keywords:             |       Stage:  Unreviewed
Has_patch:  1          |  
-----------------------+----------------------------------------------------
 It's not possible to use the Media class for inline Javascript or CSS
 content, though this is often useful when bootstrapping external scripts.

 Widgets can include inline content in their render method, but
 ModelAdmin's appear to be out of luck.

 I've attached a patch to allow inline content, e.g:

 {{{
     @property
     def media(self):
         return forms.Media(
             js=(forms.Media.Inline('alert("Test")'),),
             css={
                 'all': (forms.Media.Inline('body { background: black
 }'),),
             }
         )
 }}}

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