Subclassing the django.forms.widgets.Select class and setting it as a
widget for the form field.

On Wed, Jun 10, 2015 at 2:13 PM, <[email protected]> wrote:

> I decided to use {{ form.activity }} instead of that code above, but it is
> a bit strange, it should work in that way.
>
> Now, I'm using django-widget-tweaks (
> https://github.com/kmike/django-widget-tweaks) to add some attributes to
> selected tag and it's working.
>
> The reason why I wasn't this to render automatically is because it gets
> less customizable. For example: How would you add an attribute for each
> option in that select field?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1ec396fb-ff4b-43ea-8304-4a876bd56c35%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/1ec396fb-ff4b-43ea-8304-4a876bd56c35%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALn3ei2YiqV9%3DHU7d%3DCWEeD%3Df9-OUzuBVG8Dfx3Tg4GqPbcfeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to