2008-08-04 03:55:26 +08:00
|
|
|
from django.core import context_processors
|
|
|
|
from django.shortcuts import render_to_response
|
|
|
|
from django.template.context import RequestContext
|
|
|
|
|
2014-08-27 16:41:12 +08:00
|
|
|
from .models import DebugObject
|
|
|
|
|
2008-08-04 03:55:26 +08:00
|
|
|
|
|
|
|
def request_processor(request):
|
2014-08-27 16:41:12 +08:00
|
|
|
return render_to_response(
|
|
|
|
'context_processors/request_attrs.html',
|
2014-11-22 16:22:38 +08:00
|
|
|
context_instance=RequestContext(request, {}, processors=[context_processors.request]))
|
2014-08-27 16:41:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
def debug_processor(request):
|
2014-11-22 16:22:38 +08:00
|
|
|
|
2014-08-27 16:41:12 +08:00
|
|
|
return render_to_response(
|
|
|
|
'context_processors/debug.html',
|
2014-11-22 16:22:38 +08:00
|
|
|
context_instance=RequestContext(request, {
|
2014-08-27 16:41:12 +08:00
|
|
|
'debug_objects': DebugObject.objects,
|
|
|
|
}, processors=[context_processors.debug]))
|