Skip to main content

Add css classes and html tag attributes to django form's label.

Project description

Add css classes and html tag attributes to form’s label in django templates. This library can render a form label like django-widget-tweaks

The license is MIT.


$ pip install django-label-tag-attr

Then add ‘label_tag_attr’ to INSTALLED_APPS.


Previous(Use django-widget-tweaks only)

{% load widget_tweaks %}

<label id="{{ form.text.auto_id }}" class="control-label">{{ form.text.label }}</label>
{% render_label form.text class="form-control" %}

Use django-label-tag-attr

render_label template tag for customizing form’s label by using an HTML-like syntax.

{% load label_tag_attr %}
{% load widget_tweaks %}

{% render_label form.text class="control-label" %}
{% render_field form.text class="form-control" %}



1.0.0 (2015-03-29)

Initial release

1.0.2 (2015-05-09)

  • Support django1.8 and python2.7.
  • Bug fixed.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-label-tag-attr, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size django_label_tag_attr-1.0.2-py3-none-any.whl (3.6 kB) File type Wheel Python version 3.4 Upload date Hashes View
Filename, size django-label-tag-attr-1.0.2.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page