diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-12 00:56:23 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-12 00:56:23 +0000 |
| commit | 33527c4543b02b9eacd1425677049bf1b53b6d00 (patch) | |
| tree | 85e7d36af144dfccf83fdcfcddeb719a2dd1d355 | |
| parent | b0a259e9b1e6b430cbdf2332dcd466250cd1fccd (diff) | |
automatic import of python-django-taggit-autosuggest
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-django-taggit-autosuggest.spec | 313 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 315 insertions, 0 deletions
@@ -0,0 +1 @@ +/django-taggit-autosuggest-0.4.1.tar.gz diff --git a/python-django-taggit-autosuggest.spec b/python-django-taggit-autosuggest.spec new file mode 100644 index 0000000..ed56f0c --- /dev/null +++ b/python-django-taggit-autosuggest.spec @@ -0,0 +1,313 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-taggit-autosuggest +Version: 0.4.1 +Release: 1 +Summary: Autosuggestions for django-taggit +License: MIT License +URL: https://bitbucket.org/fabian/django-taggit-autosuggest +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/01/fd/806e0df2b3eca98e6d45fce30e414f5361b3a94bfdfa4c5943ea88ebf8d3/django-taggit-autosuggest-0.4.1.tar.gz +BuildArch: noarch + +Requires: python3-django-taggit + +%description +Disclaimer: This project is unmaintained since I don't use it myself anymore +and I did not find a maintainer within the user base so far. +However, I'm happy to accept pull requests! + + +*** Credits *** + This project is directly based on those projects: + * Alex Gaynor, https://github.com/alex/django-taggit + * Ludwik Trammer, http://code.google.com/p/django-tagging-autocomplete/ + * Jeremy Epstein, https://github.com/Jaza/django-taggit-autocomplete + * Flavio Curella, https://github.com/fcurella/django-taggit-autocomplete + * Drew Wilson, http://code.drewwilson.com/entry/autosuggest-jquery-plugin + +*** Installation *** + * Add "taggit_autosuggest" to your INSTALLED_APPS in your project settings + * Run "python manage.py collectstatic" in your django site dir. + * Add the following line to your project's urls.py file: + (r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), + + +*** Settings *** + TAGGIT_AUTOSUGGEST_STATIC_BASE_URL: + Instead of collecting and serving the static files directly, you can + also set this variable to your static base URL somewhere else. + TAGGIT_AUTOSUGGEST_MAX_SUGGESTIONS (Defaults to 20): + The amount of suggestions is limited, you can raise or lower the limit + of default 20 using this setting. + TAGGIT_AUTOSUGGEST_CSS_FILENAME (Defaults to 'autoSuggest.css'): + Set the CSS file which best fits your site elements. + The CSS file have to be in 'jquery-autosuggest/css/'. + TAGGIT_AUTOSUGGEST_MODELS (Defaults to tuple('taggit','Tag')) + The Tag model used, if you happen to use Taggit custom tagging. + +*** Usage *** +To enable autosuggesting Tags, just let the tagged model use TaggableManager: + + from django.db import models + from taggit_autosuggest.managers import TaggableManager + + + class SomeModel(models.Model): + + tags = TaggableManager() + +To use autosuggesting Tags outside of Django Admin pages ensure that the static +files are added to the template's <head>, either hardcoded, e.g. + + <link href="{{ STATIC_URL }}jquery-autosuggest/css/autoSuggest-upshot.css" + type="text/css" media="all" rel="stylesheet" /> + <script type="text/javascript" + src="{{ STATIC_URL }}jquery-autosuggest/js/jquery.autoSuggest.minified.js"> + </script> + +or by adding the form/formset's media attribute to the template's context +(this is what happens in Django Admin), e.g. + + # In the view: + context.update({'media': form.media}) # or however you add to the context + + # In the template: + {{ media }} + +(Either way, of course, the template must also include a jQuery library.) + +If Taggit custom tagging is used the autosuggested Tags can be filtered by +attributes of the request object after the name filtering. To enable this +the custom tag model should have a function called request_filter which +takes a request object and returns a django.db.models.Q object, e.g. + + from django.db import models + + class MyTag(TagBase): + + @staticmethod + def request_filter(request): + + return models.Q(...) + +There's a demo project using Grappelli bundled, you can run it and browse +/admin/ using the username 'demo' and password 'demo'. + + +%package -n python3-django-taggit-autosuggest +Summary: Autosuggestions for django-taggit +Provides: python-django-taggit-autosuggest +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-taggit-autosuggest +Disclaimer: This project is unmaintained since I don't use it myself anymore +and I did not find a maintainer within the user base so far. +However, I'm happy to accept pull requests! + + +*** Credits *** + This project is directly based on those projects: + * Alex Gaynor, https://github.com/alex/django-taggit + * Ludwik Trammer, http://code.google.com/p/django-tagging-autocomplete/ + * Jeremy Epstein, https://github.com/Jaza/django-taggit-autocomplete + * Flavio Curella, https://github.com/fcurella/django-taggit-autocomplete + * Drew Wilson, http://code.drewwilson.com/entry/autosuggest-jquery-plugin + +*** Installation *** + * Add "taggit_autosuggest" to your INSTALLED_APPS in your project settings + * Run "python manage.py collectstatic" in your django site dir. + * Add the following line to your project's urls.py file: + (r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), + + +*** Settings *** + TAGGIT_AUTOSUGGEST_STATIC_BASE_URL: + Instead of collecting and serving the static files directly, you can + also set this variable to your static base URL somewhere else. + TAGGIT_AUTOSUGGEST_MAX_SUGGESTIONS (Defaults to 20): + The amount of suggestions is limited, you can raise or lower the limit + of default 20 using this setting. + TAGGIT_AUTOSUGGEST_CSS_FILENAME (Defaults to 'autoSuggest.css'): + Set the CSS file which best fits your site elements. + The CSS file have to be in 'jquery-autosuggest/css/'. + TAGGIT_AUTOSUGGEST_MODELS (Defaults to tuple('taggit','Tag')) + The Tag model used, if you happen to use Taggit custom tagging. + +*** Usage *** +To enable autosuggesting Tags, just let the tagged model use TaggableManager: + + from django.db import models + from taggit_autosuggest.managers import TaggableManager + + + class SomeModel(models.Model): + + tags = TaggableManager() + +To use autosuggesting Tags outside of Django Admin pages ensure that the static +files are added to the template's <head>, either hardcoded, e.g. + + <link href="{{ STATIC_URL }}jquery-autosuggest/css/autoSuggest-upshot.css" + type="text/css" media="all" rel="stylesheet" /> + <script type="text/javascript" + src="{{ STATIC_URL }}jquery-autosuggest/js/jquery.autoSuggest.minified.js"> + </script> + +or by adding the form/formset's media attribute to the template's context +(this is what happens in Django Admin), e.g. + + # In the view: + context.update({'media': form.media}) # or however you add to the context + + # In the template: + {{ media }} + +(Either way, of course, the template must also include a jQuery library.) + +If Taggit custom tagging is used the autosuggested Tags can be filtered by +attributes of the request object after the name filtering. To enable this +the custom tag model should have a function called request_filter which +takes a request object and returns a django.db.models.Q object, e.g. + + from django.db import models + + class MyTag(TagBase): + + @staticmethod + def request_filter(request): + + return models.Q(...) + +There's a demo project using Grappelli bundled, you can run it and browse +/admin/ using the username 'demo' and password 'demo'. + + +%package help +Summary: Development documents and examples for django-taggit-autosuggest +Provides: python3-django-taggit-autosuggest-doc +%description help +Disclaimer: This project is unmaintained since I don't use it myself anymore +and I did not find a maintainer within the user base so far. +However, I'm happy to accept pull requests! + + +*** Credits *** + This project is directly based on those projects: + * Alex Gaynor, https://github.com/alex/django-taggit + * Ludwik Trammer, http://code.google.com/p/django-tagging-autocomplete/ + * Jeremy Epstein, https://github.com/Jaza/django-taggit-autocomplete + * Flavio Curella, https://github.com/fcurella/django-taggit-autocomplete + * Drew Wilson, http://code.drewwilson.com/entry/autosuggest-jquery-plugin + +*** Installation *** + * Add "taggit_autosuggest" to your INSTALLED_APPS in your project settings + * Run "python manage.py collectstatic" in your django site dir. + * Add the following line to your project's urls.py file: + (r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), + + +*** Settings *** + TAGGIT_AUTOSUGGEST_STATIC_BASE_URL: + Instead of collecting and serving the static files directly, you can + also set this variable to your static base URL somewhere else. + TAGGIT_AUTOSUGGEST_MAX_SUGGESTIONS (Defaults to 20): + The amount of suggestions is limited, you can raise or lower the limit + of default 20 using this setting. + TAGGIT_AUTOSUGGEST_CSS_FILENAME (Defaults to 'autoSuggest.css'): + Set the CSS file which best fits your site elements. + The CSS file have to be in 'jquery-autosuggest/css/'. + TAGGIT_AUTOSUGGEST_MODELS (Defaults to tuple('taggit','Tag')) + The Tag model used, if you happen to use Taggit custom tagging. + +*** Usage *** +To enable autosuggesting Tags, just let the tagged model use TaggableManager: + + from django.db import models + from taggit_autosuggest.managers import TaggableManager + + + class SomeModel(models.Model): + + tags = TaggableManager() + +To use autosuggesting Tags outside of Django Admin pages ensure that the static +files are added to the template's <head>, either hardcoded, e.g. + + <link href="{{ STATIC_URL }}jquery-autosuggest/css/autoSuggest-upshot.css" + type="text/css" media="all" rel="stylesheet" /> + <script type="text/javascript" + src="{{ STATIC_URL }}jquery-autosuggest/js/jquery.autoSuggest.minified.js"> + </script> + +or by adding the form/formset's media attribute to the template's context +(this is what happens in Django Admin), e.g. + + # In the view: + context.update({'media': form.media}) # or however you add to the context + + # In the template: + {{ media }} + +(Either way, of course, the template must also include a jQuery library.) + +If Taggit custom tagging is used the autosuggested Tags can be filtered by +attributes of the request object after the name filtering. To enable this +the custom tag model should have a function called request_filter which +takes a request object and returns a django.db.models.Q object, e.g. + + from django.db import models + + class MyTag(TagBase): + + @staticmethod + def request_filter(request): + + return models.Q(...) + +There's a demo project using Grappelli bundled, you can run it and browse +/admin/ using the username 'demo' and password 'demo'. + + +%prep +%autosetup -n django-taggit-autosuggest-0.4.1 + +%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-autosuggest -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Apr 12 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.1-1 +- Package Spec generated @@ -0,0 +1 @@ +8f12d216ea4e7588dec3296fcabdf372 django-taggit-autosuggest-0.4.1.tar.gz |
