Skip to main content

django-tagging-autocomplete

django-tagging-autocomplete is a jquery based autocomplete solution for django-tagging.

Requirements

  • django-tagging

Setup

  1. Download package and install, for example using pip:

    pip install django-tagging-autocomplete
  2. Add tagging_autocomplete to installed apps in your project’s settings.

  3. Add the following line to your project’s urls.py file:

    (r'^tagging_autocomplete/', include('tagging_autocomplete.urls')),

Usage

The Model Field

You can use TagAutocompleteField() to enable autocompletion right in your models.py. In most cases this is the easiest solution:

from django.db import models
from tagging_autocomplete.models import TagAutocompleteField

class SomeModel(models.Model):
        tags = TagAutocompleteField()

The Form Widget

Alternatively you can use the TagAutocomplete() form widget while creating your form:

from django import forms
from tagging.forms import TagField
from tagging_autocomplete.widgets import TagAutocomplete

class SomeForm(forms.Form):
    tags = TagField(widget=TagAutocomplete())

Optional settings

By default the maximum number of results suggested by the autocompletion is 100. You can modify this number by adding to your settings.py project file the TAGGING_AUTOCOMPLETE_MAX_RESULTS constant. For example:

TAGGING_AUTOCOMPLETE_MAX_RESULTS = 5

By default autocompletion suggests tags that start with a given term. In case you need to show ones that contain the given term, set TAGGING_AUTOCOMPLETE_SEARCH_CONTAINS to True. For example:

TAGGING_AUTOCOMPLETE_SEARCH_CONTAINS = True

By default suggestions are shown right after you enter first character. You can configure this behaviour using TAGGING_AUTOCOMPLETE_MIN_LENGTH. For example:

TAGGING_AUTOCOMPLETE_MIN_LENGTH = 3

Release files for django-tagging-autocomplete 0.5.1

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-tagging-autocomplete 0.5.1
File Size Uploaded
django-tagging-autocomplete-0.5.1.tar.gz 53.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-tagging-autocomplete 0.5.1
File Interpreter ABI Platform
django_tagging_autocomplete-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 132.5 kB

Release files / django-tagging-autocomplete-0.5.1.tar.gz

Download URL django-tagging-autocomplete-0.5.1.tar.gz
Size 53.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5e1bccc0c24504fdd3bf764feb165a0ddf527a2377bec314ac0c310be0833188
BLAKE2b-256 checksum
How to use checksums
54838a8b307ad517f51a231844dfd8a6101e00ac094fda91ffa42b45386121ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Release files / django_tagging_autocomplete-0.5.1-py3-none-any.whl

Download URL django_tagging_autocomplete-0.5.1-py3-none-any.whl
Size 78.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97d8783f0bc031b5ce984d0a34d53e07c53e58ba41a60706a7d50afe683eb1c6
BLAKE2b-256 checksum
How to use checksums
3b4b1188d50a8a6dbd5c46359fc0c93f9a862a75060683ef5608e425f0ef0428
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4

1 release file

0.3.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