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 3.x pypi Travis Build coverage MIT License

Project aims to support 3.4+ and Django 2.0+.

Current stable version is 1.5.5.

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

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.5.5.tar.gz (203.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: django-easy-select2-1.5.5.tar.gz
  • Upload date:
  • Size: 203.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.5

File hashes

Hashes for django-easy-select2-1.5.5.tar.gz
Algorithm Hash digest
SHA256 7075efa9582e6359c4d4731be863ef50f9a18b3429fa58048dcbc8c4a916eacc
MD5 289e049d5da509ba5aeac7a4436a3ac9
BLAKE2b-256 770056aaa3df21b578eacc2b5023df6631d6ac8df5e2b6ec2fa80dccc1dc8f19

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