Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

55 lines (48 sloc) 1.399 kB
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
from debug_toolbar.panels import DebugPanel
class HeaderDebugPanel(DebugPanel):
A panel to display HTTP headers.
name = 'Header'
has_content = True
# List of headers we want to display
header_filter = (
def nav_title(self):
return _('HTTP Headers')
def title(self):
return _('HTTP Headers')
def url(self):
return ''
def process_request(self, request):
self.headers = dict(
[(k, request.META[k]) for k in self.header_filter if k in request.META]
def content(self):
context = self.context.copy()
'headers': self.headers
return render_to_string('debug_toolbar/panels/headers.html', context)
Jump to Line
Something went wrong with that request. Please try again.