This is a simplified fork of Django.js that only supports client URLs.
- All of the template and templatetag helpers have been removed.
- The only endpoint is
urls.json
- You must manually initialize the
window.Django
object with the urls endpoint.
To use:
urlpatterns = [
...
url(r'^djangojs/', include('djangojs.urls')),
...
]
<script src="{% static 'djangojs/django.js' %}"></script>
<script>
Django.initialize({urls: 'djangojs/urls.json'})
</script>
Python: 2.7, 3.3, 3.4, 3.5 Django: 1.8, 1.9, 1.10
Django.js provides tools for JavaScript development with Django.
Django.js is inspired from:
This is currently a work in progress (API wil not be stable before 1.0) so don't expect it to be perfect but please submit an issue for any bug you find or any feature you want.
Django.js requires Python 2.6+ and Django 1.4.2+.
You can install Django.js with pip:
$ pip install django.js
or with easy_install:
$ easy_install django.js
Add djangojs
to your settings.INSTALLED_APPS
.
Add djangojs.urls
to your root URL_CONF
:
urlpatterns = patterns('',
...
url(r'^djangojs/', include('djangojs.urls')),
...
)
The documentation is hosted on Read the Docs