Django.js provide better integration of javascript into Django.
Packaged jQuery version
This module provide helper views for javascript.
Bases: django.views.generic.base.TemplateView
Render a javascript file containing the URLs mapping and the context as JSON.
Bases: django.views.generic.base.View
A views that render JSON.
Bases: djangojs.views.JsonView
Render the URLs as a JSON object.
Bases: djangojs.views.JsonView
Render the context as a JSON object.
Bases: django.views.generic.base.TemplateView
Base class for JS tests views
Includes or not Django.js in the test view
Includes or not jQuery in the test view.
A path or a list of path to javascript files to include into the view.
Bases: djangojs.views.JsTestView
Render a Jasmine test runner.
Bases: djangojs.views.JsTestView
Render a QUnit test runner
QUnit runner theme.
Should be one of: qunit, gabe, ninja, nv
This module provide Javascript test runners for Django unittest.
Bases: djangojs.runners.PhantomJsRunner, django.test.testcases.LiveServerTestCase
A PhantomJS suite that run against the Django LiveServerTestCase
an optionnal arguments array to pass to the reverse() function
an optionnal keyword arguments dictionnary to pass to the reverse() function
a mandatory named URL that point to the test runner page
Bases: djangojs.runners.PhantomJsRunner, unittest.case.TestCase
A PhantomJS suite that run against a local html file
absolute path to the test runner page
Bases: djangojs.runners.JsFileTestCase
A PhantomJS suite that run against a rendered html file but without server.
Note
Template is rendered using a modified static storage that give file:// scheme URLs. To benefits from it, you have to use either the static template tag or one the djangojs template tags.
Warning
Template is not rendered within a request/response dialog. You can’t access the request object and everything that depends on the server.
Includes or not jQuery in the test view. Template has to handle the use_jquery property.
A path or a list of path to javascript files to include into the view.
absolute path to the test runner page
Bases: exceptions.Exception
An exception raised by Javascript tests.
It display javascript errors into the exception message.
Bases: object
A mixin that runs a jasmine test suite with PhantomJs.
This modules holds every helpers that does not fit in any standard django modules.
It might be splitted in futur releases.
This module provide test runners for JS in Django.
Provide template tags to help with Javascript/Django integration.
Bases: django.template.base.Node
Wrap {% verbatim %} and {% endverbatim %} around a block of javascript template and this will try its best to output the contents with no changes.
{% verbatim %}
{% trans "Your name is" %} {{first}} {{last}}
{% endverbatim %}
A simple shortcut to render a script tag to a static coffeescript file
A simple shortcut to render a script tag to a static coffeescript file
A simple shortcut to render a link tag to a static CSS file
Include Django.js javascript library in the page
Include Django.js javascript library initialization in the page
A simple shortcut to render a script tag to a static javascript file
A shortcut to render a script tag for the packaged jQuery
A simple shortcut to render a script tag to a static javascript file
Renders verbatim tags
Javascript templates (jquery, handlebars.js, mustache.js) use constructs like:
{{if condition}} print something{{/if}}
This, of course, completely screws up Django templates, because Django thinks {{ and }} means something.
The following code preserves {{ }} tokens.
This version of verbatim template tag allows you to use tags like url {% url name %}. {% trans “foo” %} or {% csrf_token %} within.