Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/c-bata/django-label-tag-attr
Add css classes and html tag attributes to django form's label.
https://github.com/c-bata/django-label-tag-attr
Last synced: 14 days ago
JSON representation
Add css classes and html tag attributes to django form's label.
- Host: GitHub
- URL: https://github.com/c-bata/django-label-tag-attr
- Owner: c-bata
- License: mit
- Created: 2015-03-28T04:51:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-07T15:18:29.000Z (over 9 years ago)
- Last Synced: 2024-10-08T21:06:21.770Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 211 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
=====================
django-label-tag-attr
=====================.. image:: https://travis-ci.org/c-bata/django-label-tag-attr.svg
:target: https://travis-ci.org/c-bata/django-label-tag-attr.. image:: https://badge.fury.io/py/django-label-tag-attr.svg
:target: http://badge.fury.io/py/django-label-tag-attrAdd 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)
---------------------------------------.. code-block:: html
{% load widget_tweaks %}
{{ form.text.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.
.. code-block:: html
{% load label_tag_attr %}
{% load widget_tweaks %}{% render_label form.text class="control-label" %}
{% render_field form.text class="form-control" %}Resources
=========* `Github `_
* `PyPI `_