Source

django-field-attributes / README.md

Vladimir Korsun b13b475 


Vladimir Korsun 0bd9a57 

Vladimir Korsun b13b475 



Vladimir Korsun e25bba9 
Vladimir Korsun b13b475 

Vladimir Korsun a22d627 
Vladimir Korsun b13b475 





Vladimir Korsun e25bba9 




Vladimir Korsun b13b475 






Vladimir Korsun 0bd9a57 
Vladimir Korsun b13b475 
Vladimir Korsun c9e830e 
Vladimir Korsun 0bd9a57 




Vladimir Korsun c9e830e 

About
=====

Django application that can change the field widget attributes in place,
compare widget class name.

Install
=======

Cloning repository
-------------------

    hg clone https://bitbucket.org/amigo/django-field-attributes

Via package index
-----------------

    pip install django-field-attributes

Add to INSTALLED_APPS
---------------------

    INSTALLED_APPS += ('django-field-attributes',)

Usage
=====

Template example:

    {% load field_attributes %}

    {% field form.title class="announce" %}

    {% field form.tags placeholder=form.tags.help_text %}

    {% if form.title|is_widget:"TextInput" %}
        <h1>Title is TextInput</h1>
    {% endif %}

    {% if field|is_widget:"Textarea,TextInput" %}
        {% field field placeholder=field.help_text %}
    {% endif %}