Skip to main content
Help us improve Python packaging – donate today!

django-selectize is a Django app based on Selectize.js that help you to create Select and Multiselect widgets in Django forms.

Project Description

django-selectize
================

django-selectize is a Django app based on Selectize.js that help you to create Select and Multiselect widgets in Django forms.


Requirements
------------

* Django


Installing django-selectize
---------------------------

There are several ways to install django-selectize:

* Automatically, via a package manager: `pip install django-selectize`
* Download a release package then unzip and run `python setup.py install` to install it into your python directory.
* If you don't like to install then download a release package, unzip and copy the folder `selectize` to your Django-project directory.


Required settings
-----------------

Begin by adding `selectize` to the `INSTALLED_APPS` setting of your project. For example, you might have something like the following in your Django settings file:

INSTALLED_APPS = (
'django.contrib...',
'django.contrib....',
'selectize',
# ...other installed applications...
)

**Note:** you must place `selectize` above other installed applications.

Usage
-----

In templates, load the `selectize_tags`::

{% load selectize_tags %}

To include selectize.default.css:

{% selectize_tags_media 'css' 'default' %}

which will return:

<link rel="stylesheet" href="{% static "selectize/css/selectize.default.css" %}">

Like wise you can include selectice.js by:

{% selectize_tags_media 'js' 'selectize' %}

Also if you want to include the jquery file packed with django-selectize,:

{% selectize_tags_media 'js' 'jquery' %}


Now Intiate a selectize box from a normal selectbox by calling:

<script>$('#id_publications').selectize();</script>


Full Example
------------

For testing
-----------
You need to install Selenium:

pip install selenium

Run the tests:

./manage.py test

Release history Release notifications

This version
History Node

1.2

History Node

1.1

History Node

1.1b

History Node

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-selectize-1.2.tar.gz (117.1 kB) Copy SHA256 hash SHA256 Source None Jul 21, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page