django-taggit
=============
.. image:: https://jazzband.co/static/img/badge.svg
:target: https://jazzband.co/
:alt: Jazzband
.. image:: https://img.shields.io/pypi/pyversions/django-taggit.svg
:target: https://pypi.org/project/django-taggit/
:alt: Supported Python versions
.. image:: https://img.shields.io/pypi/djversions/django-taggit.svg
:target: https://pypi.org/project/django-taggit/
:alt: Supported Django versions
.. image:: https://github.com/jazzband/django-taggit/workflows/Test/badge.svg
:target: https://github.com/jazzband/django-taggit/actions
:alt: GitHub Actions
.. image:: https://codecov.io/gh/jazzband/django-taggit/coverage.svg?branch=master
:target: https://codecov.io/gh/jazzband/django-taggit?branch=master
This is a `Jazzband <https://jazzband.co>`_ project. By contributing you agree
to abide by the `Contributor Code of Conduct
<https://jazzband.co/about/conduct>`_ and follow the `guidelines
<https://jazzband.co/about/guidelines>`_.
``django-taggit`` a simpler approach to tagging with Django. Add ``"taggit"`` to your
``INSTALLED_APPS`` then just add a TaggableManager to your model and go:
.. code:: python
from django.db import models
from taggit.managers import TaggableManager
class Food(models.Model):
# ... fields here
tags = TaggableManager()
Then you can use the API like so:
.. code:: pycon
>>> apple = Food.objects.create(name="apple")
>>> apple.tags.add("red", "green", "delicious")
>>> apple.tags.all()
[<Tag: red>, <Tag: green>, <Tag: delicious>]
>>> apple.tags.remove("green")
>>> apple.tags.all()
[<Tag: red>, <Tag: delicious>]
>>> Food.objects.filter(tags__name__in=["red"])
[<Food: apple>, <Food: cherry>]
Tags will show up for you automatically in forms and the admin.
``django-taggit`` requires Django 3.2 or greater.
For more info check out the `documentation
<https://django-taggit.readthedocs.io/>`_. And for questions about usage or
development you can create an issue on Github (if your question is about
usage please add the `question` tag).
Raw data
{
"_id": null,
"home_page": "https://github.com/jazzband/django-taggit",
"name": "django-taggit",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Alex Gaynor",
"author_email": "alex.gaynor@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/10/eb/269501702e231b552f68d813d0a07ac1ea81fd25a3c92fb0f249818f0f39/django-taggit-5.0.1.tar.gz",
"platform": null,
"description": "django-taggit\n=============\n\n.. image:: https://jazzband.co/static/img/badge.svg\n :target: https://jazzband.co/\n :alt: Jazzband\n\n.. image:: https://img.shields.io/pypi/pyversions/django-taggit.svg\n :target: https://pypi.org/project/django-taggit/\n :alt: Supported Python versions\n\n.. image:: https://img.shields.io/pypi/djversions/django-taggit.svg\n :target: https://pypi.org/project/django-taggit/\n :alt: Supported Django versions\n\n.. image:: https://github.com/jazzband/django-taggit/workflows/Test/badge.svg\n :target: https://github.com/jazzband/django-taggit/actions\n :alt: GitHub Actions\n\n.. image:: https://codecov.io/gh/jazzband/django-taggit/coverage.svg?branch=master\n :target: https://codecov.io/gh/jazzband/django-taggit?branch=master\n\nThis is a `Jazzband <https://jazzband.co>`_ project. By contributing you agree\nto abide by the `Contributor Code of Conduct\n<https://jazzband.co/about/conduct>`_ and follow the `guidelines\n<https://jazzband.co/about/guidelines>`_.\n\n``django-taggit`` a simpler approach to tagging with Django. Add ``\"taggit\"`` to your\n``INSTALLED_APPS`` then just add a TaggableManager to your model and go:\n\n.. code:: python\n\n from django.db import models\n\n from taggit.managers import TaggableManager\n\n\n class Food(models.Model):\n # ... fields here\n\n tags = TaggableManager()\n\n\nThen you can use the API like so:\n\n.. code:: pycon\n\n >>> apple = Food.objects.create(name=\"apple\")\n >>> apple.tags.add(\"red\", \"green\", \"delicious\")\n >>> apple.tags.all()\n [<Tag: red>, <Tag: green>, <Tag: delicious>]\n >>> apple.tags.remove(\"green\")\n >>> apple.tags.all()\n [<Tag: red>, <Tag: delicious>]\n >>> Food.objects.filter(tags__name__in=[\"red\"])\n [<Food: apple>, <Food: cherry>]\n\nTags will show up for you automatically in forms and the admin.\n\n``django-taggit`` requires Django 3.2 or greater.\n\nFor more info check out the `documentation\n<https://django-taggit.readthedocs.io/>`_. And for questions about usage or\ndevelopment you can create an issue on Github (if your question is about\nusage please add the `question` tag).\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "django-taggit is a reusable Django application for simple tagging.",
"version": "5.0.1",
"project_urls": {
"Documentation": "https://django-taggit.readthedocs.io",
"Homepage": "https://github.com/jazzband/django-taggit",
"Source": "https://github.com/jazzband/django-taggit",
"Tracker": "https://github.com/jazzband/django-taggit/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "071894a45c8c50592d5cf7d73a9111053917c3684fda031c988041396bb3e588",
"md5": "736783e5e7db87a1a444eaf8223ac1bf",
"sha256": "a0ca8a28b03c4b26c2630fd762cb76ec39b5e41abf727a7b66f897a625c5e647"
},
"downloads": -1,
"filename": "django_taggit-5.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "736783e5e7db87a1a444eaf8223ac1bf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 61141,
"upload_time": "2023-10-29T11:56:57",
"upload_time_iso_8601": "2023-10-29T11:56:57.954291Z",
"url": "https://files.pythonhosted.org/packages/07/18/94a45c8c50592d5cf7d73a9111053917c3684fda031c988041396bb3e588/django_taggit-5.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "10eb269501702e231b552f68d813d0a07ac1ea81fd25a3c92fb0f249818f0f39",
"md5": "9ecdda5ff4698f1d322dc73468939d8f",
"sha256": "edcd7db1e0f35c304e082a2f631ddac2e16ef5296029524eb792af7430cab4cc"
},
"downloads": -1,
"filename": "django-taggit-5.0.1.tar.gz",
"has_sig": false,
"md5_digest": "9ecdda5ff4698f1d322dc73468939d8f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 60372,
"upload_time": "2023-10-29T11:57:20",
"upload_time_iso_8601": "2023-10-29T11:57:20.124359Z",
"url": "https://files.pythonhosted.org/packages/10/eb/269501702e231b552f68d813d0a07ac1ea81fd25a3c92fb0f249818f0f39/django-taggit-5.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-29 11:57:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jazzband",
"github_project": "django-taggit",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "django-taggit"
}