Skip to main content

Django jQuery Tags Input is a Django field and widgetwrapper that uses `django-selectable for autocompletion

Project description

Overview

Django Tags Input is a module that gives you a modified version of the Xoxco jQuery Tags Input library within Django.

The result is a very pretty interface with tags and autocomplete which can optionally automatically create new items when they are missing.

One of the most useful features of Django Tags Input is that it stores the elements in the order which you input.

So if you insert B, A, C into the database, it will return it sorted the way you entered it: B, A, C.

How to install

Installing this module only takes a couple of minutes.

  1. Install the module itself

  1. Add ‘tags_input’ to your INSTALLED_APPS setting in the Django settings.py.

  2. Add the mappings to your settings.py file:

Example:

TAGS_INPUT_MAPPINGS = {
    'some_app.SomeKeyword': {
        'field': 'some_field',
    },
    'some_app.SomeOtherKeyword': {
        'fields': ('some_field', 'some_other_field'),
    },
    'some_app.SomeSortedKeyword': {
        'field': 'some_field',
        'ordering': [
            'some_field',
            'some_other_field',
        ],
    },
    'some_app.SomeCreateableKeyword': {
        'field': 'some_field',
        'create_missing': True,
    },
}

Admin usage

from django.contrib import admin
import models
from tags_input import admin as tags_input_admin

class YourAdmin(tags_input_admin.TagsInputAdmin):
    pass

admin.site.register(models.YourModel, YourAdmin)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-tags-input-1.6.tar.gz (113.5 kB view details)

Uploaded Source

File details

Details for the file django-tags-input-1.6.tar.gz.

File metadata

File hashes

Hashes for django-tags-input-1.6.tar.gz
Algorithm Hash digest
SHA256 0ba01d8e426a7db38908f252bb61fc5a113a678da22929b4ec36079eb6184197
MD5 7dbc4eedbd68b71f9452078b29e33181
BLAKE2b-256 427b1889b91775adeaae6954c52bb99d1593a6bd5e865dd765d39027b9c7d779

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page