Actually, you might try adding them in your form's __init__ method,
again, after calling
the superclass method.   I've done this with choices on a field.
Since self.fields is a
deep copy, you might be safe setting an attrs attribute on the field's widget:
   self.fields['fieldname'].widget.attrs.update(extra_attrs)
or some such.

On Thu, Jun 3, 2010 at 12:08 PM, Thomas Allen <[email protected]> wrote:
> On Jun 3, 12:05 pm, Thomas Allen <[email protected]> wrote:
>> I'm able to get pretty far with the template tag approach. The trouble
>> is that BoundForms offer no way to directly add attributes, which I
>> think can only be included when defining the form field in question.
>
> Actually if I bypass unicode() and use as_widget directly, I can
> provide attrs.
>
> Thomas
>
> --
> 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.
>
>

-- 
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