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.

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

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

https://github.com/asyncee/django-easy-select2/raw/master/screenshots/select2_text_input.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.2.6.tar.gz (151.3 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-easy-select2-1.2.6.tar.gz
Algorithm Hash digest
SHA256 6bcfe55db1a16e65ff2d0bf051eeab07ae919279d0605b43109d03940afd2fbe
MD5 2babc79a408a1ffd925fdc9f7ce061a4
BLAKE2b-256 ca301843a8cb441562db37c284590eb6aa43501aff5ea28bce1cfb87588b5bee

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