mirror of
https://github.com/django/django.git
synced 2024-12-28 03:55:50 +00:00
eacf244506
Fixed #23364. Thanks Markush2010 for the report.
20 lines
606 B
Python
20 lines
606 B
Python
from django.core import context_processors
|
|
from django.shortcuts import render_to_response
|
|
from django.template.context import RequestContext
|
|
|
|
from .models import DebugObject
|
|
|
|
|
|
def request_processor(request):
|
|
return render_to_response(
|
|
'context_processors/request_attrs.html',
|
|
RequestContext(request, {}, processors=[context_processors.request]))
|
|
|
|
|
|
def debug_processor(request):
|
|
return render_to_response(
|
|
'context_processors/debug.html',
|
|
RequestContext(request, {
|
|
'debug_objects': DebugObject.objects,
|
|
}, processors=[context_processors.debug]))
|