django-js-utils 0.0.5

Django app to help RIA development on top of a Django backend
django-js-utils is a Django app that aims to offer Django/JavaScript developers with various tools which will help RIA development on top of a Django backend.

Installation and usage

- Add django_js_utils to your python path and add the django_js_utils application to your INSTALLED_APPS
- Add the jsurls view to your URL patterns, e.g.,

(r'^jsurls.js$', 'django_js_utils.views.jsurls', {}, 'jsurls'),

- Load the static django_js_utils.js (which contains the reverse function) and the dynamically-generated jsurls.js from every web page where you plan to use the reverse function (likely just your base.html template). Example:

< script type="text/javascript" src="{% staticfile 'django_js_utils.js' %}" >< /script >
< script type="text/javascript" src="{% url jsurls %}" >< /script >


- In your JavaScript code, reverse URLs as follows:

django_js_utils.urls.resolve('dashboard')
django_js_utils.urls.resolve('time_edit', { project_id: 1, time_id: 2 })


For more information about usage, see example.html

last updated on:
September 10th, 2012, 5:38 GMT
price:
FREE!
developed by:
Vebjorn Ljosa
license type:
BSD License 
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT