#5517: [newforms-admin] - media for base forms
--------------------------------------------------+-------------------------
Reporter: Petr Marhoun <[EMAIL PROTECTED]> | Owner: nobody
Status: new | Component:
django.newforms
Version: newforms-admin | Keywords: media,
form_for_model
Stage: Unreviewed | Has_patch: 1
--------------------------------------------------+-------------------------
I think it should be possible to define media on base form. Example from
the attached patch:
{{{
>>> class FormWithMedia(BaseForm):
... class Media:
... js = ['form.js']
... css = {'all': ['form.css']}
>>> CategoryFormWithMedia = form_for_model(Category, form=FormWithMedia)
>>> f = CategoryFormWithMedia()
>>> print f.media
<link href="form.css" type="text/css" media="all" rel="stylesheet" />
<script type="text/javascript" src="form.js"></script>
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/5517>
Django Code <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
-~----------~----~----~----~------~----~------~--~---