Django select2 theme for select input widgets.
Project description
This is django application that brings select2 widget to select inputs in admin.
Project aims to support 3.4+ and Django 2.0+.
Current stable version is 1.5.4.
For Django < 2.0 version support or python-2.x compatibility, please use version 1.3.4 which is the last version to support python-2.x compatibility.
This django application is just a lightweight wrapper on Select2 library and provides easy-to-use basic select2 functionality in a django project. If you need feature-rich solution, i recommend you to look at the latest django-select2 library, which have ajax loading support.
If anyone really wants this functionality in django-easy-select2, please feel free to contribute.
Upgrade notes
For details please read changelog.
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):
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
Hashes for django-easy-select2-1.5.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae5413ae0b12681decfb6da1f2e8a6e4f32c77243317b4cc880a24660ff93035 |
|
MD5 | 25e085d75073062c53b8d7c9dba6de78 |
|
BLAKE2b-256 | b042eb4cbfb8f5cc5e4f8fe146e64fce0b42a17ff88bab719c0dcd98d3fd885f |