{"id":14972759,"url":"https://github.com/chhantyal/taggit-selectize","last_synced_at":"2025-06-29T11:34:03.552Z","repository":{"id":27368096,"uuid":"30843584","full_name":"chhantyal/taggit-selectize","owner":"chhantyal","description":"Auto-complete/auto-suggestion for django-taggit (django-taggit + selectize.js)","archived":false,"fork":false,"pushed_at":"2021-11-11T15:04:56.000Z","size":160,"stargazers_count":68,"open_issues_count":6,"forks_count":23,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-17T02:01:39.524Z","etag":null,"topics":["django","django-application","django-taggit","python","selectize"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chhantyal.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-15T21:50:52.000Z","updated_at":"2022-11-16T15:14:22.000Z","dependencies_parsed_at":"2022-07-24T15:01:52.000Z","dependency_job_id":null,"html_url":"https://github.com/chhantyal/taggit-selectize","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chhantyal%2Ftaggit-selectize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chhantyal%2Ftaggit-selectize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chhantyal%2Ftaggit-selectize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chhantyal%2Ftaggit-selectize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chhantyal","download_url":"https://codeload.github.com/chhantyal/taggit-selectize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240783138,"owners_count":19856780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-application","django-taggit","python","selectize"],"created_at":"2024-09-24T13:47:29.241Z","updated_at":"2025-02-26T03:15:44.420Z","avatar_url":"https://github.com/chhantyal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"taggit-selectize\n================\n\nAuto-complete/auto-suggestion for django-taggit.\n\n[django-taggit](https://github.com/alex/django-taggit) + [selectize.js](https://github.com/brianreavis/selectize.js)\n\n![taggit-selectize demo screenshot](https://i.imgur.com/ryxW6TI.png)\n\nWith `django-taggit`, you can attach tags in any Django models. However, user experience is not that good as it uses\ncomma to separate multiple tags in same form field, and resulting in duplicate tags eg. Himalaya vs. Himalayas, Sublime-Text vs. Sublime Text etc.\nAnd you probably want auto-complete/auto-suggest feature when user types some characters in tag field. Thanks to selectize.js, we got that covered :)\n\n\nFeatures\n--------\n* Supports Django \u003e= 2.2\n* Supports \u003e=Python2.7 and \u003e=Python3.4\n* Simple installation, selectize.js 0.12.1 included\n* Will use jQuery install included in Django admin, no installation of jQuery needed\n* Will use custom jQuery object if it is installed, though\n* Themed to match new Django 1.9 flat theme\n* Exposes many selectize.js configuration options to your settings.py\n* Supports multiple TaggableManagers in a single model\n\n\nQuickstart\n----------\n\nInstall taggit-selectize:\n```bash\npip install taggit-selectize\n```\n\nUsage\n-----\n\n1. Put `taggit_selectize` in settings:\n    ```python\n    INSTALLED_APPS = (\n        'django.contrib.admin',\n        ...\n        ...\n        'taggit',\n        'taggit_selectize',\n    )\n    ```\n\n2. Configured Taggit in your Django settings to use a custom string-to-tag parser that doesn't parse on spaces to match the functionality of\nSelectize.js, and a custom tag joiner that supports configurable delimiters.\n    ```python\n    TAGGIT_TAGS_FROM_STRING = 'taggit_selectize.utils.parse_tags'\n    TAGGIT_STRING_FROM_TAGS = 'taggit_selectize.utils.join_tags'\n    ```\n\n3. Update urls.py.\n    ```python\n    urlpatterns = [\n        ...\n    \n        url(r'^taggit/', include('taggit_selectize.urls')),\n        url(r'^admin/', include(admin.site.urls)),\n        ...\n    ]\n    ```\n\n4. Use the `TaggableManager` from taggit_selectize (instead of taggit) in your models.\n    ```python\n    from taggit_selectize.managers import TaggableManager\n    \n    class MyModel(models.Model):\n        tags = TaggableManager()\n    ```\n\n\nConfiguration\n-------------\nIn your settings.py (these are defaults):\n\n```python\nTAGGIT_SELECTIZE = {\n    'MINIMUM_QUERY_LENGTH': 2,\n    'RECOMMENDATION_LIMIT': 10,\n    'CSS_FILENAMES': (\"taggit_selectize/css/selectize.django.css\",),\n    'JS_FILENAMES': (\"taggit_selectize/js/selectize.js\",),\n    'DIACRITICS': True,\n    'CREATE': True,\n    'PERSIST': True,\n    'OPEN_ON_FOCUS': True,\n    'HIDE_SELECTED': True,\n    'CLOSE_AFTER_SELECT': False,\n    'LOAD_THROTTLE': 300,\n    'PRELOAD': False,\n    'ADD_PRECEDENCE': False,\n    'SELECT_ON_TAB': False,\n    'REMOVE_BUTTON': False,\n    'RESTORE_ON_BACKSPACE': False,\n    'DRAG_DROP': False,\n    'DELIMITER': ','\n}\n```\n\n### MINIMUM_QUERY_LENGTH\n\nThe minimum number of characters the user needs to type to cause an AJAX request to hit the server for autocompletion. Default: 2\n\n### RECOMMENDATION_LIMIT\n\nThe maximum number of results to return to the user for recommendation. Default: 10\n\n### CSS_FILENAMES\n\nA tuple of CSS files to include on any page that has the taggit-selectize widget on it. Default: `(\"taggit_selectize/css/selectize.django.css\",)`\n\n### JS_FILENAMES\n\nA tuple of JS files to include on any page that has the taggit-selectize widget on it. Default: `(\"taggit_selectize/js/selectize.js\",)`\n\n### DIACRITICS, CREATE, PERSIST, OPEN_ON_FOCUS, HIDE_SELECTED, CLOSE_AFTER_SELECT, LOAD_THROTTLE, PRELOAD, ADD_PRECEDENCE, SELECT_ON_TAB\n\nOptions that are passed directly to selectize.js.\nPlease see [the selectize.js documentation](https://github.com/selectize/selectize.js/blob/master/docs/usage.md) for explanation\n\n### REMOVE_BUTTON\n\nAdds a remove button to each tag item by including the 'remove_button' plugin.\n\n### RESTORE_ON_BACKSPACE\n\nAdds the 'restore_on_backspace' plugin to selectize.js.\n\n### DRAG_DROP\n\nAdds the 'drag_drop' plugin to selectize.js. WARNING: This requires JQuery UI (Sortable) to be installed. If it's not, then\nselectize.js will throw an error in the console and refuse to run.\n\n### DELIMITER\n\nSet the delimiter between tags, for example, ';' or '|'. Make sure you have set up the custom TAGGIT_STRING_FROM_TAGS for this to work properly\nwith Taggit. Default is comma, ','.\n\nDemo app\n--------\n\nThere is demo app included `example_app`.\n\n1. `cd example_app`\n2. `python manage.py migrate`\n3. `python manage.py runserver`\n\nLogin username: `admin` password: `admin`\n\n\nVersions\n--------\n1. 0.x Initial release with Django 1.5 - 1.8 support. Latest upload on this series is `0.1.2`. Use this if you need old Django support.\n\n2. 1.x Release with Django 1.9 support.\n\n3. 2.x This version might introduce backward incompatibility. It improves the way it works (widget instead of admin overrride) and adds many new features \n[Thanks a ton to Nathan](https://github.com/chhantyal/taggit-selectize/pull/5).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchhantyal%2Ftaggit-selectize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchhantyal%2Ftaggit-selectize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchhantyal%2Ftaggit-selectize/lists"}