2008-08-04 03:55:26 +08:00
|
|
|
from django.shortcuts import render_to_response
|
2014-12-03 06:23:51 +08:00
|
|
|
from django.template import context_processors
|
2008-08-04 03:55:26 +08:00
|
|
|
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]))
|