Skip to main content

Django JS Urls: urlpatterns for clientside

Project description

Django JS Utils [![Build Status](](

A fork of dutils, a library for using Django urlpatterns on the clientside.


1. Add `django_js_utils` to INSTALLED_APPS

2. Set the file to hold the generated urls
```URLS_JS_GENERATED_FILE = 'static/js/dutils.conf.urls.js'```

3. Add inclusion/exclusions patterns
URLS_INCLUDE_PATTERN = ['index','status']
URLS_EXCLUDE_PREFIX = ['^internal',]

4. Add to your project:
<script type="text/javascript" src="{{STATIC_URL}}dutils.js"></script>
<script type="text/javascript" src="{{STATIC_URL}}dutils.conf.urls.js"></script>


1. Create the `URLS_JS_GENERATED_FILE` (for production remember to run `collectstatic`):
python js_urls

2. Clientside Django urlpatterns:
url('time_edit', {'project_id': 1, time_id: 2}
url('time_edit', [1, 2])


Credit contributing to django-js-utils goes to:
* Marco Louro (author)
* Chris Reeves
* Dimitri Gnidash
* Luke Zapart
* Robby Dermody
* Antti Kaihola
* Simon Williams
* Jussi Vaihia

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-utils-nextgen, version 0.9.0
Filename, size File type Python version Upload date Hashes
Filename, size django-js-utils-nextgen-0.9.0.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page