This is a Django integration for Select2
Find a file
Johannes Hoppe f31beec0c4
Add support for custom to_field names for foreign keys (#486)
Django's ForeignKey supports custom to_fields. The to field is the
primary key by default, but can be modified. The to field is also
used by forms to reduce database lookups.

This patch add support for custom to_field names on both model or
form layer.
2018-06-30 14:56:32 +02:00
django_select2 Add support for custom to_field names for foreign keys (#486) 2018-06-30 14:56:32 +02:00
docs Add some quickstart docs (#467) 2018-03-19 12:09:54 +01:00
tests Add support for custom to_field names for foreign keys (#486) 2018-06-30 14:56:32 +02:00
.bandit Add bandit config 2018-05-07 18:52:17 +02:00
.gitignore Add support for Django 1.11 2017-04-14 14:09:23 +02:00
.travis.yml Add support for Django 2.0 2017-11-25 18:56:46 +01:00
CHANGELOG.md Link to github releases from readme+changelog. (#481) 2018-05-31 09:29:18 +02:00
LICENSE Switch to short version of APL2 2017-11-25 18:56:46 +01:00
README.rst Link to github releases from readme+changelog. (#481) 2018-05-31 09:29:18 +02:00
requirements-dev.txt Fix #464 -- Freeze Sphinx to 1.6.5 2018-03-07 22:36:43 +01:00
requirements.txt Switch releases to pbr 2017-11-25 18:56:46 +01:00
setup.cfg Fix #461 -- Remove explicit Django version classifiers 2018-02-17 15:05:46 +01:00
setup.py Switch releases to pbr 2017-11-25 18:56:46 +01:00
tox.ini Add support for Django 2.0 2017-11-25 18:56:46 +01:00

Django-Select2
==============

|version| |ci| |coverage| |license|

This is a `Django`_ integration of `Select2`_.

The app includes Select2 driven Django Widgets.

Installation
------------

1. Install ``django_select2``

.. code:: python

    pip install django_select2

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

3. Add ``django_select`` to your urlconf if you use any "Auto" fields.

.. code:: python

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

Documentation
-------------

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

External Dependencies
---------------------

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

Example Application
-------------------

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

Changelog
---------

See `Github releases`_


.. _Django: https://www.djangoproject.com/
.. _Select2: http://ivaynberg.github.com/select2/
.. _CHANGELOG.md: CHANGELOG.md
.. _Github releases: https://github.com/applegrew/django-select2/releases

.. |version| image:: https://img.shields.io/pypi/v/Django-Select2.svg
   :target: https://pypi.python.org/pypi/Django-Select2/
.. |ci| image:: https://travis-ci.org/applegrew/django-select2.svg?branch=master
   :target: https://travis-ci.org/applegrew/django-select2
.. |coverage| image:: https://codecov.io/gh/applegrew/django-select2/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/applegrew/django-select2
.. |license| image:: https://img.shields.io/badge/license-APL2-blue.svg
   :target: https://raw.githubusercontent.com/applegrew/django-select2/master/LICENSE.txt