Skip to main content

Django select2 theme for select input widgets.

Project description

This is django application that brings select2 widget to select inputs in admin.


Python 2.7, 3.x pypi Travis Build coverage MIT License


Project aims to support Python 2.7, 3.3 and 3.4, Django 1.6, 1.7 and 1.8.

UPGRADE NOTES : Version 1.3 introduced backward incompatible changes. Read more in changelog.

Also, Select2 library was upgraded from 3.4 to 4.0.0. If you are tied to older version, please, use django-easy-select2 1.2.13.

How it looks

Select one of existing values with single-valued choice field (ForeignKeyField, for example):

https://github.com/asyncee/django-easy-select2/raw/master/screenshots/select2_single.png

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):

https://github.com/asyncee/django-easy-select2/raw/master/screenshots/select2_multiple.png

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-easy-select2-1.3.tar.gz (202.5 kB view details)

Uploaded Source

File details

Details for the file django-easy-select2-1.3.tar.gz.

File metadata

File hashes

Hashes for django-easy-select2-1.3.tar.gz
Algorithm Hash digest
SHA256 8016238dd642fadd9073a9e6e817b1e7527186911bea914461f663b170dd9ebb
MD5 d84860abab904cb92c3fdf5e5bfaae1c
BLAKE2b-256 9773e74b9514c6864e1d8f1e601303bad353a637922273c4e892ec491a1428ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page