Django widgets with tagify.js
Project description
Django Tagify Widget
This is a Django widget that integrates with tagify.js to provide tagging functionality in Django forms.
Features
- Integrates seamlessly with Django forms.
- Uses
tagify.jsfor a sleek, modern UI.
Installation
You can install django-tagify-widget using pip:
pip install django-tagify-widget
Requirements
- Django 2.0.0 or higher
- Python 3 or higher
Usage
To use the django-tagify-widget in your Django project, simply import it in your forms and use it as you would any standard Django form widget.Example
Here's a simple example of how to use it in a Django form:python
from django import forms
from django.db import models
from tagify_widget.widgets import TagSelect, TagSelectMultiple
# ex_app/models.py of this repogitory
class Book(models.Model):
MALE = 'M'
FEMALE = 'F'
GENDER_CHOICES = [
(MALE, 'Male'),
(FEMALE, 'Female'),
]
name = models.CharField(max_length=50);
gender = models.CharField(max_length=1, choices=GENDER_CHOICES);
category = models.ForeignKey(
Type,
on_delete=models.CASCADE
)
makers = models.ManyToManyField(Maker)
def __str__(self) -> str:
return self.name
# ex_app/admin.py of this repogitory
class MyModelForm(forms.ModelForm):
class Meta:
model = Book
fields = '__all__'
widgets = {
'gender': TagSelect(),
'category': TagSelect(),
'makers': TagSelectMultiple(),
}
Contributing
Contributions to django-tagify-widget are welcome! Please refer to the GitHub repository for more details.Author
- zzqyu
- Email: wjdrb0626@naver.com
License
This project is licensed under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_tagify_widget-0.1.3-py3-none-any.whl.
File metadata
- Download URL: django_tagify_widget-0.1.3-py3-none-any.whl
- Upload date:
- Size: 33.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06dbb02bb0370d5a6714eb1ad0ffbf1ffda576dba5615ef702d08fe721893dbc
|
|
| MD5 |
5c1ea9aede0ed1a3e67f81079da3b4c6
|
|
| BLAKE2b-256 |
bd5a98683ee76b8b6e5e64b85fc0d8ea306471b9014381ab41a2327fe3c81691
|