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`
* Manually, by downloading a release package then unzip and copy the folder `selectize` to your 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>
For testing
-----------
You need to install Selenium:
pip install selenium
Run the tests:
./manage.py test
================
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`
* Manually, by downloading a release package then unzip and copy the folder `selectize` to your 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>
For testing
-----------
You need to install Selenium:
pip install selenium
Run the tests:
./manage.py test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-selectize-1.1.tar.gz
(116.9 kB
view hashes)