mirror of
https://github.com/django/django.git
synced 2024-11-20 00:14:08 +00:00
21 lines
645 B
Python
21 lines
645 B
Python
from django.shortcuts import render_to_response
|
|
from django.template import context_processors
|
|
from django.template.context import RequestContext
|
|
|
|
from .models import DebugObject
|
|
|
|
|
|
def request_processor(request):
|
|
return render_to_response(
|
|
'context_processors/request_attrs.html',
|
|
context_instance=RequestContext(request, {}, processors=[context_processors.request]))
|
|
|
|
|
|
def debug_processor(request):
|
|
|
|
return render_to_response(
|
|
'context_processors/debug.html',
|
|
context_instance=RequestContext(request, {
|
|
'debug_objects': DebugObject.objects,
|
|
}, processors=[context_processors.debug]))
|