django-taggit


Namedjango-taggit JSON
Version 6.1.0 PyPI version JSON
download
home_pagehttps://github.com/jazzband/django-taggit
Summarydjango-taggit is a reusable Django application for simple tagging.
upload_time2024-09-29 08:07:39
maintainerNone
docs_urlNone
authorAlex Gaynor
requires_python>=3.8
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            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": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Alex Gaynor",
    "author_email": "alex.gaynor@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/34/a6/f1beaf8f552fe90c153cc039316ebab942c23dfbc88588dde081fefca816/django_taggit-6.1.0.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": "6.1.0",
    "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": "6b344185c345530b91d05cb82e05d07148f481a5eb5dc2ac44e092b3daa6f206",
                "md5": "6410e53aa22b5b673664567313993ae5",
                "sha256": "ab776264bbc76cb3d7e49e1bf9054962457831bd21c3a42db9138b41956e4cf0"
            },
            "downloads": -1,
            "filename": "django_taggit-6.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6410e53aa22b5b673664567313993ae5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 75749,
            "upload_time": "2024-09-29T08:07:14",
            "upload_time_iso_8601": "2024-09-29T08:07:14.612190Z",
            "url": "https://files.pythonhosted.org/packages/6b/34/4185c345530b91d05cb82e05d07148f481a5eb5dc2ac44e092b3daa6f206/django_taggit-6.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "34a6f1beaf8f552fe90c153cc039316ebab942c23dfbc88588dde081fefca816",
                "md5": "8a7c27ac88a8b123c882f9807b9810c5",
                "sha256": "c4d1199e6df34125dd36db5eb0efe545b254dec3980ce5dd80e6bab3e78757c3"
            },
            "downloads": -1,
            "filename": "django_taggit-6.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8a7c27ac88a8b123c882f9807b9810c5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 38151,
            "upload_time": "2024-09-29T08:07:39",
            "upload_time_iso_8601": "2024-09-29T08:07:39.477009Z",
            "url": "https://files.pythonhosted.org/packages/34/a6/f1beaf8f552fe90c153cc039316ebab942c23dfbc88588dde081fefca816/django_taggit-6.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-29 08:07:39",
    "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"
}
        
Elapsed time: 0.31489s