Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Select2 option fields for Django

Project description


  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 collectstatic

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

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


Documentation available at

More details

More details can be found on my blog at -

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)


See [](


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


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.

Files for mysociety-Django-Select2, version
Filename, size File type Python version Upload date Hashes
Filename, size mysociety_Django_Select2- (114.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size mysociety-Django-Select2- (99.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page