Skip to main content

Expose your Django routes to JavaScript

Project description

Django JS Routing

**django-js-routing** is a simple

It's based on the Symfony's [JsRoutingBundle](, but simplified, of course :)

Installation & usage

1. Install using pip:

pip install django-js-routing



3. Add the URL's to settings/ file:

urlpatterns = patterns('',
url(r'^django_js_routing/', include('django_js_routing.urls', namespace='django_js_routing')),

4. Name your routes and add them to, under:


5. Add required scripts to your HTML:

{% load staticfiles %}
<script src="{% static 'django_js_routing/router.min.js' %}"></script>
<script src="{% url 'django_js_routing:routes' %}"></script>

6. Use it!

var url = DjangoUrl.reverse('exposed_route', {param1: 12, param2: 15});


**django-js-routing** is written by Magd Kudama (


You can use this library under the MIT license. See the LICENSE file for details

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-js-routing, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size django-js-routing-1.0.4.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page