Fabulous Tagging for Django
Project description
A tagging library for Django built on ForeignKey and ManyToManyField, giving you all their normal power with a sprinkling of tagging syntactic sugar.
Project site: http://radiac.net/projects/django-tagulous/
Source code: https://github.com/radiac/django-tagulous
Features
Easy to install - simple requirements, simple syntax, lots of options
Based on ForeignKey and ManyToManyField, so it’s easy to query
Autocomplete support built in, if you want it
Supports multiple independent tag fields on a single model
Can be used as a user-customisable CharField with choices
Supports trees of nested tags, for detailed categorisation
Admin support for managing tags and tagged models
Version 0.12.0; supports Django 1.4.2 to 1.10, on Python 2.7 to 3.5.
See the Documentation for details of how Tagulous works; in particular:
Installation - how to install Tagulous
Example Usage - see examples of Tagulous in use
Upgrading - how to upgrade Tagulous, and see what has changed in the changelog.
Contributing - for how to contribute to Tagulous, and the planned roadmap.
Quickstart
Install with pip install django-tagulous, add tagulous to Django’s INSTALLED_APPS, then start adding tag fields to your model:
from django.db import models
import tagulous
class Person(models.Model):
name = models.CharField(max_length=255)
title = tagulous.models.SingleTagField(initial="Mr, Mrs, Miss, Ms")
skills = tagulous.models.TagField()
You can now set and get them using strings, lists or querysets:
myperson = Person.objects.create(name='Bob', title='Mr', skills='run, hop') # myperson.skills == 'run, hop' myperson.skills = ['jump', 'kung fu'] myperson.save() # myperson.skills == 'jump, "kung fu"' runners = Person.objects.filter(skills='run')
Behind the scenes your tags are stored in separate models (by default), so because the fields are based on ForeignKey and ManyToManyField more complex queries are simple:
qs = MyRelatedModel.objects.filter(
person__skills__name__in=['run', 'jump'],
)
As well as this you also get autocompletion in public and admin forms, automatic slug generation, unicode support, you can build tag clouds easily, and can nest tags for more complex categorisation.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-tagulous-0.12.0.tar.gz.
File metadata
- Download URL: django-tagulous-0.12.0.tar.gz
- Upload date:
- Size: 217.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd7fa2424e9d7aeeb55cbc5a6298b80b11550921ea939868af345a1aa810b242
|
|
| MD5 |
b9ed642c1465beb953039b22a5ee49da
|
|
| BLAKE2b-256 |
90c104768f124ea77eb1b691fc1994df1cce1eacf94b90a141ee02e112212f8c
|
File details
Details for the file django_tagulous-0.12.0-py2.py3-none-any.whl.
File metadata
- Download URL: django_tagulous-0.12.0-py2.py3-none-any.whl
- Upload date:
- Size: 121.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edbb9ec5fdfd20a1659c28611f3f9d100318bef83b50e1fd245542a643c09e68
|
|
| MD5 |
a9b2c172cd6bc94f3e1fb3037178ea86
|
|
| BLAKE2b-256 |
74131da299efd0abc12107d9d68b0a182db8dc2497845dffdf88f4b9bef09481
|