Metadata-Version: 2.1
Name: django-taggit-labels
Version: 0.6.0
Summary: Alternate labels for django-taggit
Home-page: https://github.com/bennylope/django-taggit-labels
Author: Ben Lopatin
Author-email: ben@wellfire.co
License: BSD
Keywords: django-taggit-labels
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Requires-Dist: django-taggit (>=0.17.0)

====================
django-taggit-labels
====================

.. image:: https://badge.fury.io/py/django-taggit-labels.svg
    :target: https://badge.fury.io/py/django-taggit-labels

.. image:: https://travis-ci.org/bennylope/django-taggit-labels.svg?branch=master
    :target: https://travis-ci.org/bennylope/django-taggit-labels

Label widget(s) for `django-taggit <https://github.com/alex/django-taggit>`_.

Now instead of this:

.. image:: https://raw.githubusercontent.com/bennylope/django-taggit-labels/master/docs/taggit-text.png

You can use this:

.. image:: https://raw.githubusercontent.com/bennylope/django-taggit-labels/master/docs/taggit-labels.png

Overview
--------

This is a widget for use in the Django admin interface, and it depends on
Django's namespaced jQuery. It allows you to add and remove tags by selecting
or deselecting visual labels.

The label widget does not expose the input field so that you can add new tags. The
base label widget instead shows all available tags and lets you pick between
them in Django's admin interface. It presumes that you are using a managed (or
'curated' if you're feeling insufferable) tag list.

Quickstart
----------

Install django-taggit-labels:

.. code-block:: bash

    pip install django-taggit-labels

Add `taggit_labels` to your project:

.. code-block:: python

    INSTALLED_APPS = (
        'taggit',
        'taggit_labels',
    )

Use the label widget:

.. code-block:: python

    from taggit_labels.widgets import LabelWidget

    class ContentForm(forms.ModelForm):
        tags = TagField(required=False, widget=LabelWidget)

Just use this form class for your `ModelAdmin
<https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.form>`_
class now.

You can use the widget with `your own tag model
<http://django-taggit.readthedocs.org/en/latest/custom_tagging.html>`_, too:

.. code-block:: python

    from taggit_labels.widgets import LabelWidget

    class ContentForm(forms.Form):
        tags = TagField(required=False, LabelWidget(model=MyTag))

The `tag` model from taggit will be presumed if you do not specify a tag model.




History
-------

0.6.0 (2018-10-29)
++++++++++++++++++

* Django 2, 2.1 compatibility

0.5.1 (2017-07-23)
++++++++++++++++++

* Fixes CSS class rendering

0.5.0 (2017-02-01)
++++++++++++++++++

* Improved label styling
* Javascript updates for usage outside the admin

0.4.1 (2016-01-13)
++++++++++++++++++

* Adds fix for widget overloading

0.4.0 (2016-01-13)
++++++++++++++++++

* Django 1.9 compatability

0.3.1 (2015-08-06)
++++++++++++++++++

* Django 1.7+ compatability bug fix

0.3.0 (2015-05-20)
++++++++++++++++++

* Better Unicode handling

0.2.0 (2015-03-31)
++++++++++++++++++

* Adds support for multiple tag fields (thanks to Lee Solway)

0.1.6 (2014-08-04)
++++++++++++++++++

* Updates styling of tag labels for line breaking and hover state

0.1.5 (2014-06-20)
++++++++++++++++++

* Fixes rendering for submitted, invalid forms

0.1.4 (2014-06-09)
++++++++++++++++++

* Adds cursor styling for labels

0.1.3 (2014-06-08)
++++++++++++++++++

* Adds style update missed in last release

0.1.2 (2014-06-08)
++++++++++++++++++

* Breaks up some widget functionality, adds minor tests

0.1.1 (2014-06-07)
++++++++++++++++++

* Fixes a bug in custom model initialization

0.1.0 (2014-06-07)
++++++++++++++++++

* First release on PyPI.


