Skip to main content

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

Project description

https://travis-ci.org/c-bata/django-label-tag-attr.svg

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.

Installation

$ pip install django-label-tag-attr

Then add ‘label_tag_attr’ to INSTALLED_APPS.

Usage

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" %}

Resources

CHANGES

1.0.0 (2015-03-29)

Initial release

Project details


Download files

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

Source Distribution

django-label-tag-attr-1.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

django_label_tag_attr-1.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file django-label-tag-attr-1.0.1.tar.gz.

File metadata

File hashes

Hashes for django-label-tag-attr-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1eca0c381553f83620e76c42ab4fa4a72e9beb9343c03dc2bb7167918729f83d
MD5 7b3c7a8cd33901365065428c814b7d4d
BLAKE2b-256 215020bfe27283e82720d7605a7e85f1431c49088028efc0f98c7999caaf095b

See more details on using hashes here.

Provenance

File details

Details for the file django_label_tag_attr-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_label_tag_attr-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 85e20d38c4bf6f32de2af1ef9ab64be3e776d0f77b2fc9964eac80d78ae9812f
MD5 29d399138c6e0a2a656d0dc849d5142f
BLAKE2b-256 e76252ddf8a8a29ee0612b7e8e651834576d2f9a56d369cbd962aea872d395f9

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page