Skip to main content

Django-Select2

[![PyPi Version](https://img.shields.io/pypi/v/Django-Select2.svg)](https://pypi.python.org/pypi/Django-Select2/) [![Build Status](https://travis-ci.org/applegrew/django-select2.svg?branch=master)](https://travis-ci.org/applegrew/django-select2) [![Code Health](https://landscape.io/github/applegrew/django-select2/master/landscape.svg?style=flat)](https://landscape.io/github/applegrew/django-select2/master) [![Test Coverage](https://coveralls.io/repos/applegrew/django-select2/badge.png?branch=master)](https://coveralls.io/r/applegrew/django-select2) [![GitHub license](https://img.shields.io/badge/license-APL2-blue.svg)](https://raw.githubusercontent.com/applegrew/django-select2/master/LICENSE.txt) [![Join the chat at https://gitter.im/applegrew/django-select2](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/applegrew/django-select2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This is a [Django](https://www.djangoproject.com/) integration of [Select2](http://ivaynberg.github.com/select2/).

The app includes Select2 driven Django Widgets and Form Fields.

Installation

  1. Install django_select2

    pip install django_select2

  2. Add django_select2 to your INSTALLED_APPS in your project settings.

  3. When deploying on production server, run :-

    python manage.py collectstatic

  4. Add django_select to your urlconf if you use any ‘Auto’ fields.

    url(r’^select2/’, include(‘django_select2.urls’)),

Documentation

Documentation available at http://django-select2.readthedocs.org/.

More details

More details can be found on my blog at - http://blog.applegrew.com/2012/08/django-select2/.

External Dependencies

  • Django - This is obvious.

  • jQuery - This is not included in the package since it is expected that in most scenarios this would already be available.

  • Memcached (python-memcached) - If you plan on running multiple python processes with GENERATE_RANDOM_SELECT2_ID enabled, then you need to turn on ENABLE_SELECT2_MULTI_PROCESS_SUPPORT. In that mode it is highly recommended that you use Memcached, to minimize DB hits.

Example Application

Please see testapp application. This application is used to manually test the functionalities of this package. This also serves as a good example.

You need only Django 1.4 or above to run that. It might run on older versions but that is not tested.

Special Thanks

  • Samuel Goldszmidt (@ouhouhsami) for reporting many fundamental issues with the code, because of which versions 2.0 and 2.0.1 were released.

Official Contributors

  • Johannes Hoppe (@codingjoe)

Changelog

See [CHANGELOG.md](CHANGELOG.md)

License

Copyright 2012 Nirupam Biswas

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this project except in compliance with the License. You may obtain a copy of the License at

[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Metadata

Release files for mysociety-Django-Select2 4.3.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mysociety-Django-Select2 4.3.2.2
File Size Uploaded
mysociety-Django-Select2-4.3.2.2.tar.gz 99.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mysociety-Django-Select2 4.3.2.2
File Interpreter ABI Platform
mysociety_Django_Select2-4.3.2.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 214.5 kB

Release files / mysociety-Django-Select2-4.3.2.2.tar.gz

Download URL mysociety-Django-Select2-4.3.2.2.tar.gz
Size 99.8 kB
Tags Source
SHA-256 checksum
How to use checksums
81f7d5e71603a1af61785fc0ca7605b7283c1c554ae046dd45f6579504eae5dc
BLAKE2b-256 checksum
How to use checksums
ecfd8331b018bd6a713108545723acd3597727b8a721840d28eafcbb653ad5d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/0.9.8 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

Release files / mysociety_Django_Select2-4.3.2.2-py2.py3-none-any.whl

Download URL mysociety_Django_Select2-4.3.2.2-py2.py3-none-any.whl
Size 114.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
81458bd82d85c83ff73103153b16253136fd804340b957baa4f12db794053505
BLAKE2b-256 checksum
How to use checksums
8601ac6b43b4863dd2bf96120e1f18537d459339906bc92a1b8f966884dd44ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/0.9.8 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

Release history Release notifications | RSS feed

This release

4.3.2.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page