django-widget-tweaks


Namedjango-widget-tweaks JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/jazzband/django-widget-tweaks
SummaryTweak the form field rendering in templates, not in python-level form definitions.
upload_time2023-08-25 15:29:12
maintainer
docs_urlNone
authorMikhail Korobov
requires_python>=3.8
licenseMIT license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ====================
django-widget-tweaks
====================

.. image:: https://jazzband.co/static/img/badge.svg
   :target: https://jazzband.co/
   :alt: Jazzband

.. image:: https://img.shields.io/pypi/v/django-widget-tweaks.svg
   :target: https://pypi.python.org/pypi/django-widget-tweaks
   :alt: PyPI Version

.. image:: https://github.com/jazzband/django-widget-tweaks/workflows/Test/badge.svg
   :target: https://github.com/jazzband/django-widget-tweaks/actions
   :alt: GitHub Actions

.. image:: https://codecov.io/gh/jazzband/django-widget-tweaks/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/jazzband/django-widget-tweaks
   :alt: Coverage

Tweak the form field rendering in templates, not in python-level
form definitions. Altering CSS classes and HTML attributes is supported.

That should be enough for designers to customize field presentation (using
CSS and unobtrusive javascript) without touching python code.

License is MIT.

Installation
============

You can get Django Widget Tweaks by using pip::

    $ pip install django-widget-tweaks

To enable `widget_tweaks` in your project you need to add it to `INSTALLED_APPS` in your projects
`settings.py` file:

.. code-block:: python

    INSTALLED_APPS += [
        'widget_tweaks',
    ]

Usage
=====

This app provides two sets of tools that may be used together or standalone:

1. a ``render_field`` template tag for customizing form fields by using an
   HTML-like syntax.
2. several template filters for customizing form field HTML attributes and CSS
   classes

The ``render_field`` tag should be easier to use and should make form field
customizations much easier for designers and front-end developers.

The template filters are more powerful than the ``render_field`` tag, but they
use a more complex and less HTML-like syntax.

render_field
------------

This is a template tag that can be used as an alternative to aforementioned
filters.  This template tag renders a field using a syntax similar to plain
HTML attributes.

Example:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- change input type (e.g. to HTML5) -->
    {% render_field form.search_query type="search" %}

    <!-- add/change several attributes -->
    {% render_field form.text rows="20" cols="20" title="Hello, world!" %}

    <!-- append to an attribute -->
    {% render_field form.title class+="css_class_1 css_class_2" %}

    <!-- template variables can be used as attribute values -->
    {% render_field form.text placeholder=form.text.label %}

    <!-- double colon -->
    {% render_field form.search_query v-bind::class="{active:isActive}" %}


For fields rendered with ``{% render_field %}`` tag it is possible
to set error class and required fields class by using
``WIDGET_ERROR_CLASS`` and  ``WIDGET_REQUIRED_CLASS`` template variables:

.. code-block:: html+django

    {% with WIDGET_ERROR_CLASS='my_error' WIDGET_REQUIRED_CLASS='my_required' %}
        {% render_field form.field1 %}
        {% render_field form.field2 %}
        {% render_field form.field3 %}
    {% endwith %}

You can be creative with these variables: e.g. a context processor could
set a default CSS error class on all fields rendered by
``{% render_field %}``.


attr
----
Adds or replaces any single html attribute for the form field.

Examples:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- change input type (e.g. to HTML5) -->
    {{ form.search_query|attr:"type:search" }}

    <!-- add/change several attributes -->
    {{ form.text|attr:"rows:20"|attr:"cols:20"|attr:"title:Hello, world!" }}

    <!-- attributes without parameters -->
    {{ form.search_query|attr:"autofocus" }}


    <!-- attributes with double colon Vuejs output: v-bind:class="{active:ValueEnabled}" -->
    {{ form.search_query|attr:"v-bind::class:{active:ValueEnabled}" }}


add_class
---------

Adds CSS class to field element. Split classes by whitespace in order to add
several classes at once.

Example:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- add 2 extra css classes to field element -->
    {{ form.title|add_class:"css_class_1 css_class_2" }}

set_data
--------

Sets HTML5 data attribute ( http://ejohn.org/blog/html-5-data-attributes/ ).
Useful for unobtrusive javascript. It is just a shortcut for 'attr' filter
that prepends attribute names with 'data-' string.

Example:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- data-filters:"OverText" will be added to input field -->
    {{ form.title|set_data:"filters:OverText" }}

append_attr
-----------

Appends attribute value with extra data.

Example:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- add 2 extra css classes to field element -->
    {{ form.title|append_attr:"class:css_class_1 css_class_2" }}

'add_class' filter is just a shortcut for 'append_attr' filter that
adds values to the 'class' attribute.


remove_attr
-----------
Removes any single html attribute for the form field.

Example:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- removes autofocus attribute from field element -->
    {{ form.title|remove_attr:"autofocus" }}


add_label_class
---------------

The same as `add_class` but adds css class to form labels.

Example:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- add 2 extra css classes to field label element -->
    {{ form.title|add_label_class:"label_class_1 label_class_2" }}


add_error_class
---------------

The same as 'add_class' but adds css class only if validation failed for
the field (field.errors is not empty).

Example:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- add 'error-border' css class on field error -->
    {{ form.title|add_error_class:"error-border" }}


add_error_attr
--------------

The same as 'attr' but sets an attribute only if validation failed for
the field (field.errors is not empty). This can be useful when dealing
with accessibility:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- add aria-invalid="true" attribute on field error -->
    {{ form.title|add_error_attr:"aria-invalid:true" }}

add_required_class
------------------

The same as 'add_error_class' adds css class only for required field.

Example:

.. code-block:: html+django

    {% load widget_tweaks %}

    <!-- add 'is-required' css class on field required -->
    {{ form.title|add_required_class:"is-required" }}


field_type and widget_type
--------------------------

``'field_type'`` and ``'widget_type'`` are template filters that return
field class name and field widget class name (in lower case).

Example:

.. code-block:: html+django

    {% load widget_tweaks %}

    <div class="field {{ field|field_type }} {{ field|widget_type }} {{ field.html_name }}">
        {{ field }}
    </div>

Output:

.. code-block:: html+django

    <div class="field charfield textinput name">
        <input id="id_name" type="text" name="name" maxlength="100" />
    </div>


Mixing render_field and filters
===============================

The render_field tag and filters mentioned above can be mixed.

Example:

.. code-block:: html+django

    {% render_field form.category|append_attr:"readonly:readonly" type="text" placeholder="Category" %}


returns:

.. code-block:: html+django

    <input name="category" placeholder="Profession" readonly="readonly" type="text">


Filter chaining
===============

The order django-widget-tweaks filters apply may seem counter-intuitive
(leftmost filter wins):

.. code-block:: html+django

    {{ form.simple|attr:"foo:bar"|attr:"foo:baz" }}

returns:

.. code-block:: html+django

    <input foo="bar" type="text" name="simple" id="id_simple" />

It is not a bug, it is a feature that enables creating reusable templates
with overridable defaults.

Reusable field template example:

.. code-block:: html+django

    {# inc/field.html #}
    {% load widget_tweaks %}
    <div>{{ field|attr:"foo:default_foo" }}</div>

Example usage:

.. code-block:: html+django

    {# my_template.html #}
    {% load widget_tweaks %}
    <form method='POST' action=''> {% csrf_token %}
        {% include "inc/field.html" with field=form.title %}
        {% include "inc/field.html" with field=form.description|attr:"foo:non_default_foo" %}
    </form>

With 'rightmost filter wins' rule it wouldn't be possible to override
``|attr:"foo:default_foo"`` in main template.

Contributing
============

If you've found a bug, implemented a feature or have a suggestion,
do not hesitate to contact me, fire an issue or send a pull request.

* Source code: https://github.com/jazzband/django-widget-tweaks/
* Bug tracker: https://github.com/jazzband/django-widget-tweaks/issues

Testing
-------

Make sure you have `tox <http://tox.testrun.org/>`_ installed, then type

::

    tox

from the source checkout.

NOT SUPPORTED
=============

MultiWidgets: SplitDateTimeWidget, SplitHiddenDateTimeWidget


Changes
=======


1.5.0 (2023-08-25)
------------------

* Add Django 4.2 support.
* Add Django 4.1 support.
* Drop Django 4.0 support.
* Drop Django 2.2 support.
* Add Python 3.11 support.
* Drop Python 3.7 support.


1.4.12 (2022-01-13)
-------------------

* Set minimum required Python version to 3.7.
* Add better documentation syntax highlighting.
* Adjust build settings and stop building deprecated universal Python 2 wheels.


1.4.11 (2022-01-08)
-------------------

* Add support for Django 4.0
* Drop support for Django 3.0 and 3.1
* Add support for Python 3.10
* Drop support for Python 3.6


1.4.9 (2021-09-02)
------------------

* Add support for Django 3.2
* Move to GitHub Actions.
* Drop support for Django 1.11.
* Add support for Python 3.9.


1.4.8 (2020-03-12)
------------------

* Fix Release version


1.4.7 (2020-03-10)
------------------

* Fix Travis deployment to Jazzband site


1.4.6 (2020-03-09)
------------------

* Feature remove attribute from field
* Added documentation for remove_attr feature
* Reformat code with black for PEP8 compatibility 
* More consistent tox configuration
* adding a new templatetag, unittest and documentation
* Deprecate Python 2.7 support
* Use automatic formatting for all files


1.4.5 (2019-06-08)
------------------

* Fix rST formatting errors.


1.4.4 (2019-06-05)
------------------

* Add support for type attr.
* Add Python 3.7 and drop Python 3.3 support.
* Add support for double colon syntax.


1.4.3 (2018-09-6)
------------------

* Added add_label_class filter for CSS on form labels
* Removed compatibility code for unsupported Django versions
* Fixed support for non-value attributes in Django < 1.8
* Support non-value attributes in HTML5 by setting their value to True


1.4.2 (2018-03-19)
------------------

* update readme to make installation more clear
* shallow copy field before updating attributes
* drop Python 2.6 and Python 3.2 support
* always cast the result of render to a string
* fix import for django >= 2.0
* moved to jazzband


1.4.1 (2015-06-29)
------------------

* fixed a regression in django-widget-tweaks v1.4
  (the field is no longer deep copied).

1.4 (2015-06-27)
----------------

* Django 1.7, 1.8 and 1.9 support;
* setup.py is switched to setuptools;
* testing improvements;
* Python 3.4 support is added;
* Python 2.5 is not longer supported;
* bitbucket repository is no longer supported (development is moved to github).

1.3 (2013-04-05)
----------------

* added support for ``WIDGET_ERROR_CLASS`` and  ``WIDGET_REQUIRED_CLASS``
  template variables that affect ``{% render_field %}``.

1.2 (2013-03-23)
----------------

* new ``add_error_attr`` template filter;
* testing improvements.

1.1.2 (2012-06-06)
------------------

* support for template variables is added to ``render_field`` tag;
* new ``field_type`` and ``widget_type`` filters.

1.1.1 (2012-03-22)
------------------

* some issues with ``render_field`` tag are fixed.

1.1 (2012-03-22)
----------------

* ``render_field`` template tag.

1.0 (2012-02-06)
----------------

* filters return empty strings instead of raising exceptions if field is missing;
* test running improvements;
* python 3 support;
* undocumented 'behave' filter is removed.

0.3 (2011-03-04)
----------------

* ``add_error_class`` filter.

0.2.1 (2011-02-03)
------------------

* Attributes customized in widgets are preserved;
* no more extra whitespaces;
* tests;

0.1 (2011-01-12)
----------------

Initial release.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jazzband/django-widget-tweaks",
    "name": "django-widget-tweaks",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Mikhail Korobov",
    "author_email": "kmike84@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a5/fe/26eb92fba83844e71bbec0ced7fc2e843e5990020e3cc676925204031654/django-widget-tweaks-1.5.0.tar.gz",
    "platform": null,
    "description": "====================\ndjango-widget-tweaks\n====================\n\n.. image:: https://jazzband.co/static/img/badge.svg\n   :target: https://jazzband.co/\n   :alt: Jazzband\n\n.. image:: https://img.shields.io/pypi/v/django-widget-tweaks.svg\n   :target: https://pypi.python.org/pypi/django-widget-tweaks\n   :alt: PyPI Version\n\n.. image:: https://github.com/jazzband/django-widget-tweaks/workflows/Test/badge.svg\n   :target: https://github.com/jazzband/django-widget-tweaks/actions\n   :alt: GitHub Actions\n\n.. image:: https://codecov.io/gh/jazzband/django-widget-tweaks/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/jazzband/django-widget-tweaks\n   :alt: Coverage\n\nTweak the form field rendering in templates, not in python-level\nform definitions. Altering CSS classes and HTML attributes is supported.\n\nThat should be enough for designers to customize field presentation (using\nCSS and unobtrusive javascript) without touching python code.\n\nLicense is MIT.\n\nInstallation\n============\n\nYou can get Django Widget Tweaks by using pip::\n\n    $ pip install django-widget-tweaks\n\nTo enable `widget_tweaks` in your project you need to add it to `INSTALLED_APPS` in your projects\n`settings.py` file:\n\n.. code-block:: python\n\n    INSTALLED_APPS += [\n        'widget_tweaks',\n    ]\n\nUsage\n=====\n\nThis app provides two sets of tools that may be used together or standalone:\n\n1. a ``render_field`` template tag for customizing form fields by using an\n   HTML-like syntax.\n2. several template filters for customizing form field HTML attributes and CSS\n   classes\n\nThe ``render_field`` tag should be easier to use and should make form field\ncustomizations much easier for designers and front-end developers.\n\nThe template filters are more powerful than the ``render_field`` tag, but they\nuse a more complex and less HTML-like syntax.\n\nrender_field\n------------\n\nThis is a template tag that can be used as an alternative to aforementioned\nfilters.  This template tag renders a field using a syntax similar to plain\nHTML attributes.\n\nExample:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- change input type (e.g. to HTML5) -->\n    {% render_field form.search_query type=\"search\" %}\n\n    <!-- add/change several attributes -->\n    {% render_field form.text rows=\"20\" cols=\"20\" title=\"Hello, world!\" %}\n\n    <!-- append to an attribute -->\n    {% render_field form.title class+=\"css_class_1 css_class_2\" %}\n\n    <!-- template variables can be used as attribute values -->\n    {% render_field form.text placeholder=form.text.label %}\n\n    <!-- double colon -->\n    {% render_field form.search_query v-bind::class=\"{active:isActive}\" %}\n\n\nFor fields rendered with ``{% render_field %}`` tag it is possible\nto set error class and required fields class by using\n``WIDGET_ERROR_CLASS`` and  ``WIDGET_REQUIRED_CLASS`` template variables:\n\n.. code-block:: html+django\n\n    {% with WIDGET_ERROR_CLASS='my_error' WIDGET_REQUIRED_CLASS='my_required' %}\n        {% render_field form.field1 %}\n        {% render_field form.field2 %}\n        {% render_field form.field3 %}\n    {% endwith %}\n\nYou can be creative with these variables: e.g. a context processor could\nset a default CSS error class on all fields rendered by\n``{% render_field %}``.\n\n\nattr\n----\nAdds or replaces any single html attribute for the form field.\n\nExamples:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- change input type (e.g. to HTML5) -->\n    {{ form.search_query|attr:\"type:search\" }}\n\n    <!-- add/change several attributes -->\n    {{ form.text|attr:\"rows:20\"|attr:\"cols:20\"|attr:\"title:Hello, world!\" }}\n\n    <!-- attributes without parameters -->\n    {{ form.search_query|attr:\"autofocus\" }}\n\n\n    <!-- attributes with double colon Vuejs output: v-bind:class=\"{active:ValueEnabled}\" -->\n    {{ form.search_query|attr:\"v-bind::class:{active:ValueEnabled}\" }}\n\n\nadd_class\n---------\n\nAdds CSS class to field element. Split classes by whitespace in order to add\nseveral classes at once.\n\nExample:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- add 2 extra css classes to field element -->\n    {{ form.title|add_class:\"css_class_1 css_class_2\" }}\n\nset_data\n--------\n\nSets HTML5 data attribute ( http://ejohn.org/blog/html-5-data-attributes/ ).\nUseful for unobtrusive javascript. It is just a shortcut for 'attr' filter\nthat prepends attribute names with 'data-' string.\n\nExample:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- data-filters:\"OverText\" will be added to input field -->\n    {{ form.title|set_data:\"filters:OverText\" }}\n\nappend_attr\n-----------\n\nAppends attribute value with extra data.\n\nExample:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- add 2 extra css classes to field element -->\n    {{ form.title|append_attr:\"class:css_class_1 css_class_2\" }}\n\n'add_class' filter is just a shortcut for 'append_attr' filter that\nadds values to the 'class' attribute.\n\n\nremove_attr\n-----------\nRemoves any single html attribute for the form field.\n\nExample:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- removes autofocus attribute from field element -->\n    {{ form.title|remove_attr:\"autofocus\" }}\n\n\nadd_label_class\n---------------\n\nThe same as `add_class` but adds css class to form labels.\n\nExample:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- add 2 extra css classes to field label element -->\n    {{ form.title|add_label_class:\"label_class_1 label_class_2\" }}\n\n\nadd_error_class\n---------------\n\nThe same as 'add_class' but adds css class only if validation failed for\nthe field (field.errors is not empty).\n\nExample:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- add 'error-border' css class on field error -->\n    {{ form.title|add_error_class:\"error-border\" }}\n\n\nadd_error_attr\n--------------\n\nThe same as 'attr' but sets an attribute only if validation failed for\nthe field (field.errors is not empty). This can be useful when dealing\nwith accessibility:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- add aria-invalid=\"true\" attribute on field error -->\n    {{ form.title|add_error_attr:\"aria-invalid:true\" }}\n\nadd_required_class\n------------------\n\nThe same as 'add_error_class' adds css class only for required field.\n\nExample:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <!-- add 'is-required' css class on field required -->\n    {{ form.title|add_required_class:\"is-required\" }}\n\n\nfield_type and widget_type\n--------------------------\n\n``'field_type'`` and ``'widget_type'`` are template filters that return\nfield class name and field widget class name (in lower case).\n\nExample:\n\n.. code-block:: html+django\n\n    {% load widget_tweaks %}\n\n    <div class=\"field {{ field|field_type }} {{ field|widget_type }} {{ field.html_name }}\">\n        {{ field }}\n    </div>\n\nOutput:\n\n.. code-block:: html+django\n\n    <div class=\"field charfield textinput name\">\n        <input id=\"id_name\" type=\"text\" name=\"name\" maxlength=\"100\" />\n    </div>\n\n\nMixing render_field and filters\n===============================\n\nThe render_field tag and filters mentioned above can be mixed.\n\nExample:\n\n.. code-block:: html+django\n\n    {% render_field form.category|append_attr:\"readonly:readonly\" type=\"text\" placeholder=\"Category\" %}\n\n\nreturns:\n\n.. code-block:: html+django\n\n    <input name=\"category\" placeholder=\"Profession\" readonly=\"readonly\" type=\"text\">\n\n\nFilter chaining\n===============\n\nThe order django-widget-tweaks filters apply may seem counter-intuitive\n(leftmost filter wins):\n\n.. code-block:: html+django\n\n    {{ form.simple|attr:\"foo:bar\"|attr:\"foo:baz\" }}\n\nreturns:\n\n.. code-block:: html+django\n\n    <input foo=\"bar\" type=\"text\" name=\"simple\" id=\"id_simple\" />\n\nIt is not a bug, it is a feature that enables creating reusable templates\nwith overridable defaults.\n\nReusable field template example:\n\n.. code-block:: html+django\n\n    {# inc/field.html #}\n    {% load widget_tweaks %}\n    <div>{{ field|attr:\"foo:default_foo\" }}</div>\n\nExample usage:\n\n.. code-block:: html+django\n\n    {# my_template.html #}\n    {% load widget_tweaks %}\n    <form method='POST' action=''> {% csrf_token %}\n        {% include \"inc/field.html\" with field=form.title %}\n        {% include \"inc/field.html\" with field=form.description|attr:\"foo:non_default_foo\" %}\n    </form>\n\nWith 'rightmost filter wins' rule it wouldn't be possible to override\n``|attr:\"foo:default_foo\"`` in main template.\n\nContributing\n============\n\nIf you've found a bug, implemented a feature or have a suggestion,\ndo not hesitate to contact me, fire an issue or send a pull request.\n\n* Source code: https://github.com/jazzband/django-widget-tweaks/\n* Bug tracker: https://github.com/jazzband/django-widget-tweaks/issues\n\nTesting\n-------\n\nMake sure you have `tox <http://tox.testrun.org/>`_ installed, then type\n\n::\n\n    tox\n\nfrom the source checkout.\n\nNOT SUPPORTED\n=============\n\nMultiWidgets: SplitDateTimeWidget, SplitHiddenDateTimeWidget\n\n\nChanges\n=======\n\n\n1.5.0 (2023-08-25)\n------------------\n\n* Add Django 4.2 support.\n* Add Django 4.1 support.\n* Drop Django 4.0 support.\n* Drop Django 2.2 support.\n* Add Python 3.11 support.\n* Drop Python 3.7 support.\n\n\n1.4.12 (2022-01-13)\n-------------------\n\n* Set minimum required Python version to 3.7.\n* Add better documentation syntax highlighting.\n* Adjust build settings and stop building deprecated universal Python 2 wheels.\n\n\n1.4.11 (2022-01-08)\n-------------------\n\n* Add support for Django 4.0\n* Drop support for Django 3.0 and 3.1\n* Add support for Python 3.10\n* Drop support for Python 3.6\n\n\n1.4.9 (2021-09-02)\n------------------\n\n* Add support for Django 3.2\n* Move to GitHub Actions.\n* Drop support for Django 1.11.\n* Add support for Python 3.9.\n\n\n1.4.8 (2020-03-12)\n------------------\n\n* Fix Release version\n\n\n1.4.7 (2020-03-10)\n------------------\n\n* Fix Travis deployment to Jazzband site\n\n\n1.4.6 (2020-03-09)\n------------------\n\n* Feature remove attribute from field\n* Added documentation for remove_attr feature\n* Reformat code with black for PEP8 compatibility \n* More consistent tox configuration\n* adding a new templatetag, unittest and documentation\n* Deprecate Python 2.7 support\n* Use automatic formatting for all files\n\n\n1.4.5 (2019-06-08)\n------------------\n\n* Fix rST formatting errors.\n\n\n1.4.4 (2019-06-05)\n------------------\n\n* Add support for type attr.\n* Add Python 3.7 and drop Python 3.3 support.\n* Add support for double colon syntax.\n\n\n1.4.3 (2018-09-6)\n------------------\n\n* Added add_label_class filter for CSS on form labels\n* Removed compatibility code for unsupported Django versions\n* Fixed support for non-value attributes in Django < 1.8\n* Support non-value attributes in HTML5 by setting their value to True\n\n\n1.4.2 (2018-03-19)\n------------------\n\n* update readme to make installation more clear\n* shallow copy field before updating attributes\n* drop Python 2.6 and Python 3.2 support\n* always cast the result of render to a string\n* fix import for django >= 2.0\n* moved to jazzband\n\n\n1.4.1 (2015-06-29)\n------------------\n\n* fixed a regression in django-widget-tweaks v1.4\n  (the field is no longer deep copied).\n\n1.4 (2015-06-27)\n----------------\n\n* Django 1.7, 1.8 and 1.9 support;\n* setup.py is switched to setuptools;\n* testing improvements;\n* Python 3.4 support is added;\n* Python 2.5 is not longer supported;\n* bitbucket repository is no longer supported (development is moved to github).\n\n1.3 (2013-04-05)\n----------------\n\n* added support for ``WIDGET_ERROR_CLASS`` and  ``WIDGET_REQUIRED_CLASS``\n  template variables that affect ``{% render_field %}``.\n\n1.2 (2013-03-23)\n----------------\n\n* new ``add_error_attr`` template filter;\n* testing improvements.\n\n1.1.2 (2012-06-06)\n------------------\n\n* support for template variables is added to ``render_field`` tag;\n* new ``field_type`` and ``widget_type`` filters.\n\n1.1.1 (2012-03-22)\n------------------\n\n* some issues with ``render_field`` tag are fixed.\n\n1.1 (2012-03-22)\n----------------\n\n* ``render_field`` template tag.\n\n1.0 (2012-02-06)\n----------------\n\n* filters return empty strings instead of raising exceptions if field is missing;\n* test running improvements;\n* python 3 support;\n* undocumented 'behave' filter is removed.\n\n0.3 (2011-03-04)\n----------------\n\n* ``add_error_class`` filter.\n\n0.2.1 (2011-02-03)\n------------------\n\n* Attributes customized in widgets are preserved;\n* no more extra whitespaces;\n* tests;\n\n0.1 (2011-01-12)\n----------------\n\nInitial release.\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Tweak the form field rendering in templates, not in python-level form definitions.",
    "version": "1.5.0",
    "project_urls": {
        "Homepage": "https://github.com/jazzband/django-widget-tweaks"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "466a6cb6deb5c38b785c77c3ba66f53051eada49205979c407323eb666930915",
                "md5": "7c397ee602bfde7fdf10244a4c81776b",
                "sha256": "a41b7b2f05bd44d673d11ebd6c09a96f1d013ee98121cb98c384fe84e33b881e"
            },
            "downloads": -1,
            "filename": "django_widget_tweaks-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7c397ee602bfde7fdf10244a4c81776b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8960,
            "upload_time": "2023-08-25T15:29:05",
            "upload_time_iso_8601": "2023-08-25T15:29:05.644626Z",
            "url": "https://files.pythonhosted.org/packages/46/6a/6cb6deb5c38b785c77c3ba66f53051eada49205979c407323eb666930915/django_widget_tweaks-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5fe26eb92fba83844e71bbec0ced7fc2e843e5990020e3cc676925204031654",
                "md5": "626f935fe6ea61fa5524d1457325c6a2",
                "sha256": "1c2180681ebb994e922c754804c7ffebbe1245014777ac47897a81f57cc629c7"
            },
            "downloads": -1,
            "filename": "django-widget-tweaks-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "626f935fe6ea61fa5524d1457325c6a2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14767,
            "upload_time": "2023-08-25T15:29:12",
            "upload_time_iso_8601": "2023-08-25T15:29:12.778887Z",
            "url": "https://files.pythonhosted.org/packages/a5/fe/26eb92fba83844e71bbec0ced7fc2e843e5990020e3cc676925204031654/django-widget-tweaks-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-25 15:29:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jazzband",
    "github_project": "django-widget-tweaks",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "django-widget-tweaks"
}
        
Elapsed time: 1.90597s