This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2019-03-14 17:01:27 +00:00
|
|
|
"""passbook administration debug views"""
|
2019-10-10 11:01:49 +00: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 11:01:49 +00:00
|
|
|
class DebugRequestView(LoginRequiredMixin, TemplateView):
|
2019-03-14 17:01:27 +00:00
|
|
|
"""Show debug info about request"""
|
|
|
|
|
2019-12-31 11:51:16 +00:00
|
|
|
template_name = "administration/debug/request.html"
|
2019-03-14 17:01:27 +00:00
|
|
|
|
|
|
|
def get_context_data(self, **kwargs):
|
2019-12-31 11:51:16 +00:00
|
|
|
kwargs["request_dict"] = {}
|
2019-03-14 17:01:27 +00:00
|
|
|
for key in dir(self.request):
|
2019-12-31 11:51:16 +00:00
|
|
|
kwargs["request_dict"][key] = getattr(self.request, key)
|
2019-03-14 17:01:27 +00:00
|
|
|
return super().get_context_data(**kwargs)
|