Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
django_taggit.egg-info/ | H | 03-May-2022 | - | 100 | 76 | |
docs/ | H | 05-Jul-2021 | - | 568 | 395 | |
taggit/ | H | 05-Jul-2021 | - | 2,786 | 2,230 | |
tests/ | H | 05-Jul-2021 | - | 3,555 | 2,976 | |
AUTHORS | H A D | 05-Jul-2021 | 618 | 21 | 17 | |
CHANGELOG.rst | H A D | 05-Jul-2021 | 10.2 KiB | 387 | 272 | |
LICENSE | H A D | 05-Jul-2021 | 1.5 KiB | 28 | 22 | |
MANIFEST.in | H A D | 05-Jul-2021 | 201 | 9 | 8 | |
PKG-INFO | H A D | 05-Jul-2021 | 3.3 KiB | 100 | 76 | |
README.rst | H A D | 05-Jul-2021 | 2.1 KiB | 66 | 45 | |
setup.cfg | H A D | 05-Jul-2021 | 1.3 KiB | 52 | 45 | |
setup.py | H A D | 05-Jul-2021 | 38 | 4 | 2 | |
tox.ini | H A D | 05-Jul-2021 | 1 KiB | 56 | 49 |
README.rst
1django-taggit 2============= 3 4.. image:: https://jazzband.co/static/img/badge.svg 5 :target: https://jazzband.co/ 6 :alt: Jazzband 7 8.. image:: https://img.shields.io/pypi/pyversions/django-taggit.svg 9 :target: https://pypi.org/project/django-taggit/ 10 :alt: Supported Python versions 11 12.. image:: https://img.shields.io/pypi/djversions/django-taggit.svg 13 :target: https://pypi.org/project/django-taggit/ 14 :alt: Supported Django versions 15 16.. image:: https://github.com/jazzband/django-taggit/workflows/Test/badge.svg 17 :target: https://github.com/jazzband/django-taggit/actions 18 :alt: GitHub Actions 19 20.. image:: https://codecov.io/gh/jazzband/django-taggit/coverage.svg?branch=master 21 :target: https://codecov.io/gh/jazzband/django-taggit?branch=master 22 23This is a `Jazzband <https://jazzband.co>`_ project. By contributing you agree 24to abide by the `Contributor Code of Conduct 25<https://jazzband.co/about/conduct>`_ and follow the `guidelines 26<https://jazzband.co/about/guidelines>`_. 27 28``django-taggit`` a simpler approach to tagging with Django. Add ``"taggit"`` to your 29``INSTALLED_APPS`` then just add a TaggableManager to your model and go: 30 31.. code:: python 32 33 from django.db import models 34 35 from taggit.managers import TaggableManager 36 37 38 class Food(models.Model): 39 # ... fields here 40 41 tags = TaggableManager() 42 43 44Then you can use the API like so: 45 46.. code:: pycon 47 48 >>> apple = Food.objects.create(name="apple") 49 >>> apple.tags.add("red", "green", "delicious") 50 >>> apple.tags.all() 51 [<Tag: red>, <Tag: green>, <Tag: delicious>] 52 >>> apple.tags.remove("green") 53 >>> apple.tags.all() 54 [<Tag: red>, <Tag: delicious>] 55 >>> Food.objects.filter(tags__name__in=["red"]) 56 [<Food: apple>, <Food: cherry>] 57 58Tags will show up for you automatically in forms and the admin. 59 60``django-taggit`` requires Django 2.2 or greater. 61 62For more info check out the `documentation 63<https://django-taggit.readthedocs.io/>`_. And for questions about usage or 64development you can create an issue on Github (if your question is about 65usage please add the `question` tag). 66