Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 12, 2011 19:48:46

Mikhail K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

ANN: django-widget-tweaks


Hi guys,

Designers often want to add some css classes and html attributes to
django form fields. But now they have to either patch the python code
or copy-paste full html widget output and then customize it. In order
to make them happy I just released an app (https://bitbucket.org/kmike/django-widget-tweaks) that makes it possible to customize html attributes and css classes
of form fields without touching python code.

Example:

{% load widget_tweaks %}
...
{{ form.city|attr:"autocomplete:off"|add_class:"my_css_class" }}

Hope somebody will find it useful.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 12, 2011 21:17:12

Leandro A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

ANN: django-widget-tweaks


Great!

I'll pass it to my designers!
It really simplifies the templating.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 13, 2011 07:40:32

sebastien p.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

ANN: django-widget-tweaks


Sounds cool !

On Jan 12, 9:48 pm, Mikhail Korobov <kmik...@googlemail.com> wrote:
> Hi guys,
>
> Designers often want to add some css classes and html attributes to
> django form fields. But now they have to either patch the python code
> or copy-paste full html widget output and then customize it. In order
> to make them happy I just released an app
> (https://bitbucket.org/kmike/django-widget-tweaks> ) that makes it possible to customize html attributes and css classes
> of form fields without touching python code.
>
> Example:
>
>     {% load widget_tweaks %}
>     ...
>     {{ form.city|attr:"autocomplete:off"|add_class:"my_css_class" }}
>
> Hope somebody will find it useful.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 16th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support