https://github.com/20tab/django-taggit-live
It's an autocomplete widget for django-taggit TagField
https://github.com/20tab/django-taggit-live
Last synced: about 1 year ago
JSON representation
It's an autocomplete widget for django-taggit TagField
- Host: GitHub
- URL: https://github.com/20tab/django-taggit-live
- Owner: 20tab
- License: other
- Created: 2012-10-07T19:14:11.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2017-01-31T16:09:23.000Z (over 9 years ago)
- Last Synced: 2025-03-27T07:11:14.396Z (about 1 year ago)
- Language: Python
- Size: 38.1 KB
- Stars: 9
- Watchers: 2
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
It's an autocomplete widget for django-taggit TagField:
http://github.com/alex/django-taggit
## Installation
1. You need to have django-taggit already installed
2. Clone django-taggit-live
3. Run setup.py to install taggit_live
(Alternatively you can use the command: pip install django-taggit-live)
4. Add "taggit_live" to installed apps in your project's settings.
5. Add the following line to your project's urls.py file:
(r'', include('taggit_live.urls')),
## Usage
You have to use TaggableManager your models.py file. Example:
``` py
from django.db import models
from taggit.managers import TaggableManager
class SomeModel(models.Model):
tags = TaggableManager()
```
Then you have to change form field in ModelForm. Example:
``` py
from taggit_live.forms import LiveTagField
class SomeForm(forms.ModelForm):
tags = LiveTagField()
class Meta:
model = SomeModel
```
Finally, you have to include jquery library in your ModelAdmin:
``` py
from taggit_live.forms import LiveTagField
class SomeAdmin(admin.ModelAdmin):
class Media:
css = {'all': ('/path_to/jquery-ui-autocomplete.css',
)
}
js = (
'/path_to/jquery-lib.js',
'/path_to/jquery-ui-autocomplete.js',
)
```