diff options
author | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-03-09 07:10:47 +0000 |
---|---|---|
committer | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-03-09 07:10:47 +0000 |
commit | 5f90b56d2e05a7a171bf337117af8242f2805a40 (patch) | |
tree | fdbd484f327f6f6f764b194b605e4f8f4540e9f1 | |
parent | 60da512f2a4f6e8bfc5508dabf890833715766da (diff) |
automatic import of python-django-taggit
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-django-taggit.spec | 151 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 153 insertions, 0 deletions
@@ -0,0 +1 @@ +/django-taggit-3.1.0.tar.gz diff --git a/python-django-taggit.spec b/python-django-taggit.spec new file mode 100644 index 0000000..abde7d1 --- /dev/null +++ b/python-django-taggit.spec @@ -0,0 +1,151 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-taggit +Version: 3.1.0 +Release: 1 +Summary: django-taggit is a reusable Django application for simple tagging. +License: BSD +URL: https://github.com/jazzband/django-taggit +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e7/3d/660e401d6e64401fc4b87373c95bbd7481429cce9a28a6f8137383188d89/django-taggit-3.1.0.tar.gz +BuildArch: noarch + +Requires: python3-Django + +%description +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: + 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: + >>> 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). + +%package -n python3-django-taggit +Summary: django-taggit is a reusable Django application for simple tagging. +Provides: python-django-taggit +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-taggit +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: + 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: + >>> 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). + +%package help +Summary: Development documents and examples for django-taggit +Provides: python3-django-taggit-doc +%description help +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: + 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: + >>> 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). + +%prep +%autosetup -n django-taggit-3.1.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-django-taggit -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 3.1.0-1 +- Package Spec generated @@ -0,0 +1 @@ +013da2dcb341e23701aa306fd90fbd2b django-taggit-3.1.0.tar.gz |