Django select2 theme for select input widgets.
Project description
This is django application that brings select2 widget to select inputs in admin.
How it looks
Select one of existing values with single-valued choice field (ForeignKeyField, for example):
Easily select 1 or more “categories” for your project, you can also add a new one in the normal, Django-Admin manner by using the green + button with multiple-valued choice field (ManyToManyField):
Don’t see the “mood” you want? No problem, just type in a new one. It will be there as a choice for the next time too (text input).
Quickstart
In your admin.py:
from django.contrib import admin from easy_select2 import select2_modelform from polls.models import Poll PollForm = select2_modelform(Poll, attrs={'width': '250px'}) class PollAdmin(admin.ModelAdmin): form = PollForm
Thats all. All your choice widgets are select2 widgets 250px wide.
Documentation
You can read more in the documentation.
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 Distribution
File details
Details for the file django-easy-select2-1.2.9.tar.gz
.
File metadata
- Download URL: django-easy-select2-1.2.9.tar.gz
- Upload date:
- Size: 154.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | deb6fbaddcad84914d0537a051941155a0b6d9c2fd5944faed0605accdffc75c |
|
MD5 | 40db4e088e6b91ac386ac31a00272045 |
|
BLAKE2b-256 | bb27b60b512c2c76b56ab017116bda3b29f9154b12e6703b590c2cbe6c8ed3b9 |