#4785: Widgets have nonconfigurable hardcoded HTML
--------------------------------------------+-------------------------------
Reporter: Michal Ludvig <[EMAIL PROTECTED]> | Owner: adrian
Status: new | Component: django.newforms
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 1
--------------------------------------------+-------------------------------
Widgets CheckboxSelectMultiple and RadioFieldRenderer have hardcoded
<ul><li>...</li></ul> tags which makes them hard to use in a design that
expects different style of output, for instance wrapping things in
<div></div> tags.
Attached patch takes these <ul> and <li> tags out of the code to a class
variable that can be easily overwritten in subclasses. Creating a widget
DivCheckboxSelectMultiple is then as simple as:
class DivCheckboxSelectMultiple(forms.widgets.CheckboxSelectMultiple):
tags = { 'block' : u'<div>%s</div>', 'item' :
u'<div><label>%(label)s %(input)s</label></div>' }
--
Ticket URL: <http://code.djangoproject.net/ticket/4785>
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
-~----------~----~----~----~------~----~------~--~---