Skip to main content

Alternate labels for django-taggit

Project description

https://badge.fury.io/py/django-taggit-labels.png https://travis-ci.org/bennylope/django-taggit-labels.png?branch=master https://coveralls.io/repos/bennylope/django-taggit-labels/badge.png?branch=master

Label widget(s) for django-taggit.

Now instead of this:

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

You can use this:

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:

pip install django-taggit-labels

Add taggit_labels to your project:

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

Use the label widget:

from taggit_labels.widgets import LabelWidget

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

You can use the widget with your own tag model, too:

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.1.0 (2014-06-07)

  • First release on PyPI.

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-taggit-labels-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

File details

Details for the file django-taggit-labels-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-taggit-labels-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5884e90405ca4c54d62e352e2e43fe03652c5bbb0acd816cf88fe6d8428d4c31
MD5 aacf4c8fe607a84e77df23a283bf591e
BLAKE2b-256 daabd5e29f61a50b2a91ec17633c3e7e36480e7c1ddb07ccbda67e71094b9a80

See more details on using hashes here.

Supported by

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