django-js-utils

Django app to help RIA development on top of a Django backend
Download

django-js-utils Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Vebjorn Ljosa

django-js-utils Tags


django-js-utils Description

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.htmlProduct's homepage


django-js-utils Related Software