Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dozmus/django-tagify
django tag input field
https://github.com/dozmus/django-tagify
django html javascript tag tagging tagify
Last synced: about 5 hours ago
JSON representation
django tag input field
- Host: GitHub
- URL: https://github.com/dozmus/django-tagify
- Owner: dozmus
- License: mit
- Created: 2018-06-27T18:26:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-30T15:49:10.000Z (over 6 years ago)
- Last Synced: 2024-10-05T13:34:40.737Z (about 2 months ago)
- Topics: django, html, javascript, tag, tagging, tagify
- Language: JavaScript
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
django-tagify
----------------A django tag input field using Tagify_ built for Django 2.0.
The tags are stored as a comma-delimited (unless if changed) ``String``... _Tagify: https://github.com/yairEO/tagify/
Usage
===============1. Models: Use ``TagsField`` to represent a tags field.
2. Forms: Make sure you display ``form.media`` in the html template, for the widget to render correctly.
3. Widget settings: Pass the settings dictionary as follows ``TagsField(widget_settings={...}``.* You can specify if 'duplicates' are allowed (boolean).
* You can specify 'autocomplete' (boolean) - this matches from the whitelist.
* You can specify 'enforceWhitelist' (boolean).
* You can specify 'maxTags' (int).
* You can specify the 'whitelist' (list containing strings).
* You can specify the 'blacklist' (list containing strings).
* You can specify the 'delimiter' (string).
* You can specify the RegEx 'pattern' to validate the input (string).If you want to allow blank inputs for tags make sure you set ``blank=True`` on ``TagsField``.
If blank inputs are allowed, they will not be filtered by the whitelist.Note: If you use ``TagsField`` in a Form, then `Form.is_valid()` will automatically verify that its values
conform to those specify in its settings, to prevent malicious behaviour from end users.Installation
===============1. Install the module
.. code-block::
pip install django-tagify
2. Add ``django_tagify`` to your ``INSTALLED_APPS`` setting in the Django ``settings.py``.
Example:
.. code-block:: python
INSTALLED_APPS = (
# ...other installed apps
'django_tagify',
)