django-tagulous


Namedjango-tagulous JSON
Version 2.1.0 PyPI version JSON
download
home_pageNone
SummaryFabulous Tagging for Django
upload_time2024-08-27 23:21:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords django tags tagging
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Django Tagulous - Fabulous Tags


[![PyPI](https://img.shields.io/pypi/v/django-tagulous.svg)](https://pypi.org/project/django-tagulous/)
[![Documentation](https://readthedocs.org/projects/django-tagulous/badge/?version=latest)](https://django-tagulous.readthedocs.io/en/latest/)
[![Tests](https://github.com/radiac/django-tagulous/actions/workflows/ci.yml/badge.svg)](https://github.com/radiac/django-tagulous/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/radiac/django-tagulous/graph/badge.svg?token=zotfCDdrUG)](https://codecov.io/gh/radiac/django-tagulous)

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.

* [Project site](https://radiac.net/projects/django-tagulous/)
* [Source code](https://github.com/radiac/django-tagulous)
* [Documentation](https://django-tagulous.readthedocs.io/)
* [Changelog](https://django-tagulous.readthedocs.io/en/latest/changelog.html)


## 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](https://django-tagulous.readthedocs.io/)
for details of how Tagulous works; in particular:

* [Installation](https://django-tagulous.readthedocs.io/en/latest/installation.html) -
  how to install Tagulous
* [Example Usage](https://django-tagulous.readthedocs.io/en/latest/usage.html) -
  see examples of Tagulous in use
* [Upgrading](https://django-tagulous.readthedocs.io/en/latest/upgrading.html) -
  how to upgrade Tagulous, and see what has changed in the
  [changelog](https://django-tagulous.readthedocs.io/en/latest/changelog.html)
* [Contributing](https://django-tagulous.readthedocs.io/en/latest/contributing.html) -
  for how to contribute to Tagulous


Quickstart
==========

Install with `pip install django-tagulous`, add `tagulous` to Django's `INSTALLED_APPS`
and
[define the serializers](http://radiac.net/projects/django-tagulous/documentation/installation/),
then start adding tag fields to your model:

```python
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::

```python
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::

```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-tagulous",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "django, tags, tagging",
    "author": null,
    "author_email": "Richard Terry <code@radiac.net>",
    "download_url": "https://files.pythonhosted.org/packages/5d/97/f9a157716e3ce00b9d0ae596d9452bc6bb993066337a885a94c96ac7169c/django_tagulous-2.1.0.tar.gz",
    "platform": null,
    "description": "# Django Tagulous - Fabulous Tags\n\n\n[![PyPI](https://img.shields.io/pypi/v/django-tagulous.svg)](https://pypi.org/project/django-tagulous/)\n[![Documentation](https://readthedocs.org/projects/django-tagulous/badge/?version=latest)](https://django-tagulous.readthedocs.io/en/latest/)\n[![Tests](https://github.com/radiac/django-tagulous/actions/workflows/ci.yml/badge.svg)](https://github.com/radiac/django-tagulous/actions/workflows/ci.yml)\n[![Coverage](https://codecov.io/gh/radiac/django-tagulous/graph/badge.svg?token=zotfCDdrUG)](https://codecov.io/gh/radiac/django-tagulous)\n\nA tagging library for Django. Built on ForeignKey and ManyToManyField to support tag\nstrings as well as native ORM queries.\n\nUse a `SingleTagField` as a CharField with dynamic choices, or a `TagField` for\nconventional tagging or nested categorisation.\n\n* [Project site](https://radiac.net/projects/django-tagulous/)\n* [Source code](https://github.com/radiac/django-tagulous)\n* [Documentation](https://django-tagulous.readthedocs.io/)\n* [Changelog](https://django-tagulous.readthedocs.io/en/latest/changelog.html)\n\n\n## Features\n\n* Easy to install - simple requirements, **simple syntax**, lots of options\n* Based on ForeignKey and ManyToManyField, so it's **easy to query**\n* **Autocomplete** support built in, if you want it\n* Supports multiple **independent fields** on a single model\n* Supports **trees of nested tags**, for detailed categorisation\n* Admin support for managing tags and tagged models\n\nSupports Django 3.2+, on Python 3.10+.\n\n\nSee the [Documentation](https://django-tagulous.readthedocs.io/)\nfor details of how Tagulous works; in particular:\n\n* [Installation](https://django-tagulous.readthedocs.io/en/latest/installation.html) -\n  how to install Tagulous\n* [Example Usage](https://django-tagulous.readthedocs.io/en/latest/usage.html) -\n  see examples of Tagulous in use\n* [Upgrading](https://django-tagulous.readthedocs.io/en/latest/upgrading.html) -\n  how to upgrade Tagulous, and see what has changed in the\n  [changelog](https://django-tagulous.readthedocs.io/en/latest/changelog.html)\n* [Contributing](https://django-tagulous.readthedocs.io/en/latest/contributing.html) -\n  for how to contribute to Tagulous\n\n\nQuickstart\n==========\n\nInstall with `pip install django-tagulous`, add `tagulous` to Django's `INSTALLED_APPS`\nand\n[define the serializers](http://radiac.net/projects/django-tagulous/documentation/installation/),\nthen start adding tag fields to your model:\n\n```python\nfrom django.db import models\nfrom tagulous.models import SingleTagField, TagField\n\nclass Person(models.Model):\n    name = models.CharField(max_length=255)\n    title = SingleTagField(initial=\"Mr, Mrs, Miss, Ms\")\n    skills = TagField()\n```\n\nYou can now set and get them using strings, lists or querysets::\n\n```python\nmyperson = Person.objects.create(name='Bob', title='Mr', skills='run, hop')\n# myperson.skills == 'run, hop'\nmyperson.skills = ['jump', 'kung fu']\nmyperson.save()\n# myperson.skills == 'jump, \"kung fu\"'\nrunners = Person.objects.filter(skills='run')\n```\n\nBehind the scenes each tag field is a `ForeignKey` or `ManyToManyField` relationship to\na separate model (by default), so more complex queries are simple::\n\n```python\nqs = MyRelatedModel.objects.filter(\n    person__skills__name__in=['run', 'jump'],\n)\n```\n\nAs well as this you also get autocompletion in public and admin forms,\nautomatic slug generation, unicode support, you can build tag clouds easily,\nand can nest tags for more complex categorisation.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Fabulous Tagging for Django",
    "version": "2.1.0",
    "project_urls": {
        "Changelog": "https://django-tagulous.readthedocs.io/en/latest/changelog.html",
        "Documentation": "https://django-tagulous.readthedocs.io/",
        "Homepage": "https://radiac.net/projects/django-tagulous/",
        "Issues": "https://github.com/radiac/django-tagulous/issues",
        "Repository": "https://github.com/radiac/django-tagulous"
    },
    "split_keywords": [
        "django",
        " tags",
        " tagging"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd7b14c1c0a8e5378ccebe906676084ada7c7679ad76659a44cb5a55413ba5bc",
                "md5": "60cc7a4ec168f0116d10f733fa328794",
                "sha256": "5ebba5a51f049f6df5f9d2a30eef431c0bf7cd35758aa0a42fc3351be4d239cd"
            },
            "downloads": -1,
            "filename": "django_tagulous-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "60cc7a4ec168f0116d10f733fa328794",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 286294,
            "upload_time": "2024-08-27T23:21:57",
            "upload_time_iso_8601": "2024-08-27T23:21:57.478054Z",
            "url": "https://files.pythonhosted.org/packages/dd/7b/14c1c0a8e5378ccebe906676084ada7c7679ad76659a44cb5a55413ba5bc/django_tagulous-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d97f9a157716e3ce00b9d0ae596d9452bc6bb993066337a885a94c96ac7169c",
                "md5": "b8a86a7a917eb081dbb95f0d898f1a4e",
                "sha256": "f629b54ad720052092785b0dce056dc6a68c7b63f8126075af9c25848b250bfd"
            },
            "downloads": -1,
            "filename": "django_tagulous-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b8a86a7a917eb081dbb95f0d898f1a4e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 291575,
            "upload_time": "2024-08-27T23:21:59",
            "upload_time_iso_8601": "2024-08-27T23:21:59.314026Z",
            "url": "https://files.pythonhosted.org/packages/5d/97/f9a157716e3ce00b9d0ae596d9452bc6bb993066337a885a94c96ac7169c/django_tagulous-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-27 23:21:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "radiac",
    "github_project": "django-tagulous",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-tagulous"
}
        
Elapsed time: 0.57209s