Alternate labels for django-taggit
Project description
Label widget(s) for django-taggit.
Now instead of this:
You can use this:
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, widget=LabelWidget)
Just use this form class for your ModelAdmin class now.
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.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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-taggit-labels-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0371847e23440e88921fcf55c380e5f55b5b3a1d26ee49884a80766a4cbfb9c |
|
MD5 | 4b6fddc751f29915d0aa511f2c6cf1ca |
|
BLAKE2b-256 | c420685815a95abc481d9eaaf0fb8e97e615d8ebf7ab1dba1f6345238079f75c |