2019-03-14 17:01:27 +00:00
|
|
|
"""passbook administration debug views"""
|
2019-10-10 12:01:49 +01:00
|
|
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
2019-03-14 17:01:27 +00:00
|
|
|
from django.views.generic import TemplateView
|
|
|
|
|
|
|
|
|
2019-10-10 12:01:49 +01:00
|
|
|
class DebugRequestView(LoginRequiredMixin, TemplateView):
|
2019-03-14 17:01:27 +00:00
|
|
|
"""Show debug info about request"""
|
|
|
|
|
|
|
|
template_name = 'administration/debug/request.html'
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs):
|
|
|
|
kwargs['request_dict'] = {}
|
|
|
|
for key in dir(self.request):
|
|
|
|
kwargs['request_dict'][key] = getattr(self.request, key)
|
|
|
|
return super().get_context_data(**kwargs)
|