Hi Folks.

I've looked through the docs (which are pretty godd by the way) and
the source code, but it look as  it's not easy to customize the
<label> tag that goes along with a widget.

When instantiating a widget I can pass the attrs dict and those
properties will be rendered as html attributes. But the label
parameter takes only a string, and I would love to specify what (css)
classes get rendered through that label, something like:

my_field.widget= (label : {"name": "Your name", "class": "quiet
small"}, widget=...)

so that {{field.label}} would render:
<label class="quiet smal" id="... >

Is there a way to do this, short or writing my own widget with a
custom "render" method?

Thanks,
Arthur


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to