Exemple #1
0
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)),
    }
Exemple #2
0
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)
    }