jQuery UI packaged in a django app to speed up new applications and deployment.
Note that this does not include jQuery itself, use a package such as django-jquery to do so.
Install using pip
:
pip install django-jquery-ui
Add to jquery_ui
to your INSTALLED_APPS
in settings.py
:
INSTALLED_APPS = (
...
'jquery_ui',
...
)
Run collectstatic
to bring in the jQuery UI static files.
In the template where you require jQuery UI, load Django's static
template tag library:
{% load static %}
Then use the static
template tag to load the jQuery UI files:
<script type='text/javascript' src='{% static 'js/jquery-ui.js' %}'></script>
<link rel='stylesheet' type='text/css' href='{% static 'css/jquery-ui/smoothness/jquery-ui.css' %}' />
Replace smoothness
with the jQuery UI theme you'd like to use.
This version introduces the non-compressed version of the JS and CSS. To continue using the compressed versions, please use jquery-ui.min.js
and jquery-ui.min.css
instead.