Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (10 sloc) 324 Bytes
def ajax_detect(request):
"""
Templace context processor to detect Ajax requests
The function sets the template variable root_template, which
indicates which parent-template should be used
"""
r = "index.html"
if request.is_ajax():
r = "ajax.html"
return { 'root_template' : r }