def dashboard_context(request): form = DashboardForm() t = template.loader.get_template('dashboards/filter.html') c = template.Context(locals()) return { 'dashboard_filter_form':json.dumps(t.render(c)), }
def page_context(request): gdict = {} gdict.update(request.GET) return { "PAGE":hasattr(request, 'pages') and hasattr(request.pages, 'page') and request.pages.page or None, 'URLS':request.urls, 'SETTINGS':settings, 'GET_DATA':json.dumps(gdict) }