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
1.0.2 (2015-05-09)
Support django1.8 and python2.7.
Bug fixed.
Release files for django-label-tag-attr 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-label-tag-attr-1.0.2.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_label_tag_attr-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / django-label-tag-attr-1.0.2.tar.gz
| Download URL | django-label-tag-attr-1.0.2.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4780bbbbbd3a9bb697d6efe0c55e238591b8d1f7989f90f49ba0343df300c9cb
|
|
BLAKE2b-256 checksum How to use checksums |
70f40466c9cddf185eef30240ff81ab3eaffb76734c2cf82ff027d6031704cb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_label_tag_attr-1.0.2-py3-none-any.whl
| Download URL | django_label_tag_attr-1.0.2-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ca1458f1de92f2442465d978ef49814ed9ddf1b1950fc299df9ed89cd247f90
|
|
BLAKE2b-256 checksum How to use checksums |
18f315088b9e208081d7fba63ae74bb2b7852acd8d87135a1014dc1672609bc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |