This package adds the Tag-it! jquery GUI component to django-taggit, for autocompletion and a nicer UI.
This is a Python 3/Django 1.8-compatible fork of django-taggit-jquery-tag-it, which is a fork of django-taggit-autocomplete, which is in turn a fork of django-tagging-autocomplete. Python 2, Django <= 1.6 or django-taggit-hvad-compatibility have not been re-tested since forking.
- We recomend using
pip
andvirtualenv
:
pip install git+https://github.com/technicaltitch/django-taggit-jquery-tag-it.git#egg=django_taggit_jquery_tag_it
- Add
"django_taggit_jquery_tag_it"
toINSTALLED_APPS
in your project'ssettings.py
file:
INSTALLED_APPS = (
'taggit',
'django_taggit_jquery_tag_it',
# ...
- Add the following line in your project
urls.py
file:
url(r'^django_taggit_jquery_tag_it/', include('django_taggit_jquery_tag_it.urls')),
-
You should provide jQuery and jQuery UI (and a theme). If they aren't available in the current context, set
TAGGIT_AUTOCOMPLETE_CSS
andTAGGIT_AUTOCOMPLETE_JS
in your settings file. Both settings must be lists. The theme must contain Core, Widget, Position, Autocomplete, and optionally Effects Core, Blind Effect and Highlight Effect, and can be generated at http://jqueryui.com/download/. -
Enjoy
Use our subclass of the django-taggit
taggit.managers.TaggableManager
class
in the tagged models.
Example:
from django.db import models
from django_taggit_jquery_tag_it.managers import TaggableManager
class SomeModel(models.Model):
tags = TaggableManager()