Middleware¶
-
class
ajaxviews.middleware.AjaxMiddleware[source]¶ Bases:
objectThis middleware inserts the json config script and the require main script inside the
<body></body>tag on every non ajax request.base.html¶<script id="config" type="application/json">{{ json_cfg }}</script>
base.html¶{% load require %} {% require_module 'main' %}