django's util in javascript. such as url_for etc.
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
django_util_js
examples/demo
.gitignore
README.md
setup.py

README.md

django_util_js

django's util in javascript. such as url_for etc.

usage

install django_util_js to your server app
1. add to INSTALLED_APPS
    INSTALLED_APPS = (
        ...
        'django_util_js',
    )
2. add to urls.py
    url(r'^django_util.js$', 'django_util_js.views.django_util_js'),
load django_util.js in your html file
<script src="{% url 'django_util_js.views.django_util_js' %}" type="text/javascript" charset="utf-8"></script>
use url_for in your js code
var url = django_util.url_for('sub.bpt_index', {y:2, x:'/sdf'});