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'll probably find this of interest:
http://groups.google.com/group/django-developers/browse_thread/thread/38dd8e4e11f055e8
Cheers,
Leif
Thanks for the pointer.
This certainly looks userful, but if I understand this right it makes
easier to link to external js and css, not customize the output of the
<label> tag.
Cheers
Arthur
On Jul 9, 10:06 pm, leifbyron <leifstrickl...@gmail.com> wrote:
> Arthur,
>
> You'll probably find this of interest:
>
> http://groups.google.com/group/django-developers/browse_thread/thread...
>
> Cheers,
> Leif