pozytywnie/django-javascript-settings — pull request #12 by jleszczynski (2014-08-06 10:01:07+00:00)
Title: Middleware support

In our project it turned out to particularly useful to pass configuration from middleware.

Example usage:
class JavascriptSettingsMiddleware(object):

def process_request(self, request):
request.javascript_settings = {}

def process_template_response(self, request, response):
request.javascript_settings['api_url_friend'] = '/api/v1/friend/'

return response