Fabulous Tagging for Django
Project description
Django Tagulous - Fabulous Tags
A tagging library for Django. Built on ForeignKey and ManyToManyField to support tag strings as well as native ORM queries.
Use a SingleTagField as a CharField with dynamic choices, or a TagField for
conventional tagging or nested categorisation.
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 fields on a single model
- Supports trees of nested tags, for detailed categorisation
- Admin support for managing tags and tagged models
Supports Django 3.2+, on Python 3.10+.
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
Quickstart
Install with pip install django-tagulous, add tagulous to Django's INSTALLED_APPS
and
define the serializers,
then start adding tag fields to your model:
from django.db import models
from tagulous.models import SingleTagField, TagField
class Person(models.Model):
name = models.CharField(max_length=255)
title = SingleTagField(initial="Mr, Mrs, Miss, Ms")
skills = 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 each tag field is a ForeignKey or ManyToManyField relationship to
a separate model (by default), so 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-2.1.1.tar.gz.
File metadata
- Download URL: django_tagulous-2.1.1.tar.gz
- Upload date:
- Size: 291.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
772941e0e359bb5478597fdafdb89e5619310a038e777e9599d0a5c036a05ceb
|
|
| MD5 |
f2df32777d1518ef695762e1e7ae47dc
|
|
| BLAKE2b-256 |
f4f7bef3d5ff4e0c7b786732ab77ca41eff8dd704f6552fb70b2fada1a0b64bc
|
Provenance
The following attestation bundles were made for django_tagulous-2.1.1.tar.gz:
Publisher:
pypi.yml on radiac/django-tagulous
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tagulous-2.1.1.tar.gz -
Subject digest:
772941e0e359bb5478597fdafdb89e5619310a038e777e9599d0a5c036a05ceb - Sigstore transparency entry: 246034273
- Sigstore integration time:
-
Permalink:
radiac/django-tagulous@d401e70cb62b873211ed5f85c7fd7f0ea1a8c577 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/radiac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@d401e70cb62b873211ed5f85c7fd7f0ea1a8c577 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_tagulous-2.1.1-py3-none-any.whl.
File metadata
- Download URL: django_tagulous-2.1.1-py3-none-any.whl
- Upload date:
- Size: 286.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5a6453407bcf4047f619f92be42e8b56615e00bbbd718d8810ce6fd5cf4888b
|
|
| MD5 |
01d6a5db780c390ddeb16d2da34a204d
|
|
| BLAKE2b-256 |
6603e5bf7c3535f06d3962065a8e320aaca1cf6bef85e23e3fd8725e95c551be
|
Provenance
The following attestation bundles were made for django_tagulous-2.1.1-py3-none-any.whl:
Publisher:
pypi.yml on radiac/django-tagulous
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tagulous-2.1.1-py3-none-any.whl -
Subject digest:
f5a6453407bcf4047f619f92be42e8b56615e00bbbd718d8810ce6fd5cf4888b - Sigstore transparency entry: 246034275
- Sigstore integration time:
-
Permalink:
radiac/django-tagulous@d401e70cb62b873211ed5f85c7fd7f0ea1a8c577 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/radiac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@d401e70cb62b873211ed5f85c7fd7f0ea1a8c577 -
Trigger Event:
push
-
Statement type: