Integration with other Django apps

Django Absolute

Django Absolute contribute with the following context variables:


They will be available into Django.context javascript object (nothing new, this the default behavior). But, two more methods will be available:

  • Django.absolute() to reverse an absolute URL based on request
  • to reverse an absolute URL based on Django site

If you try to call these methods without django-bsolute installed, a DjangoJsError will be thrown.

Django Pipeline

If you want to compress Django.js with Django Pipeline, you should change the way you load django.js.

First add jQuery and Django.js to your pipelines in you

    'base': {
        'source_filenames': (
        'output_filename': 'js/base.min.js',

Instead of using the django_js template tag:

{% load js %}
{% django_js %}

you should use the django_js_init and include your compressed bundle:

{% load js compressed %}
{% django_js_init %}
{% compressed_js "base" %}

Project Versions

Table Of Contents

Previous topic

Javascript test tools

Next topic

Management Commands

This Page