Skip to main content
* 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’.

Metadata

Release files for django-taggit-autosuggest 0.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-taggit-autosuggest 0.3.8
File Size Uploaded
django-taggit-autosuggest-0.3.8.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-taggit-autosuggest 0.3.8
File Interpreter ABI Platform
django_taggit_autosuggest-0.3.8-py3-none-any.whl Python 3 none any Details

Total release size: 31.2 kB

Release files / django-taggit-autosuggest-0.3.8.tar.gz

Download URL django-taggit-autosuggest-0.3.8.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
38a12cab02ad376394d9de8ceefecb4edb07df8b8926a6893dc89bc6871502db
BLAKE2b-256 checksum
How to use checksums
0969cdf32da0d42453c013169f43a898c9ffeb03eb0221f4a78d1fc23eaf75a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

Release files / django_taggit_autosuggest-0.3.8-py3-none-any.whl

Download URL django_taggit_autosuggest-0.3.8-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
443135de0bb56d1949ccbe10189d14d510a27e5ed03218cbdc8151e725146c3b
BLAKE2b-256 checksum
How to use checksums
be682a8c704bdd43cd24793a7cdb83142cfa888b2738cda4e562fe2566fbc0e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

Release history Release notifications | RSS feed

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

This release

0.3.8 This release

2 release files

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page