Skip to main content

Select2 option fields for Django

Project description

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.

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

mysociety-Django-Select2-4.3.2.2.tar.gz (99.8 kB view details)

Uploaded Source

Built Distribution

mysociety_Django_Select2-4.3.2.2-py2.py3-none-any.whl (114.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mysociety-Django-Select2-4.3.2.2.tar.gz.

File metadata

  • Download URL: mysociety-Django-Select2-4.3.2.2.tar.gz
  • Upload date:
  • Size: 99.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for mysociety-Django-Select2-4.3.2.2.tar.gz
Algorithm Hash digest
SHA256 81f7d5e71603a1af61785fc0ca7605b7283c1c554ae046dd45f6579504eae5dc
MD5 82f62b2d81de609153e2df362c07efb4
BLAKE2b-256 ecfd8331b018bd6a713108545723acd3597727b8a721840d28eafcbb653ad5d9

See more details on using hashes here.

File details

Details for the file mysociety_Django_Select2-4.3.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: mysociety_Django_Select2-4.3.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 114.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for mysociety_Django_Select2-4.3.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 81458bd82d85c83ff73103153b16253136fd804340b957baa4f12db794053505
MD5 da3c7a53bdac3a60a6aa548a0be54f0e
BLAKE2b-256 8601ac6b43b4863dd2bf96120e1f18537d459339906bc92a1b8f966884dd44ed

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