diff --git a/passbook/admin/urls.py b/passbook/admin/urls.py index 3563a0c9b..64cc15022 100644 --- a/passbook/admin/urls.py +++ b/passbook/admin/urls.py @@ -1,7 +1,7 @@ """passbook URL Configuration""" from django.urls import include, path -from passbook.admin.views import (applications, audit, factors, groups, +from passbook.admin.views import (applications, audit, debug, factors, groups, invitations, overview, policy, property_mapping, providers, sources, users) @@ -77,5 +77,7 @@ urlpatterns = [ # Groups path('groups/', groups.GroupListView.as_view(), name='groups'), # API - path('api/', include('passbook.admin.api.urls')) + path('api/', include('passbook.admin.api.urls')), + # Debug + path('debug/request/', debug.DebugRequestView.as_view(), name='debug-request'), ] diff --git a/passbook/admin/views/debug.py b/passbook/admin/views/debug.py new file mode 100644 index 000000000..336289189 --- /dev/null +++ b/passbook/admin/views/debug.py @@ -0,0 +1,17 @@ +"""passbook administration debug views""" + +from django.views.generic import TemplateView + +from passbook.admin.mixins import AdminRequiredMixin + + +class DebugRequestView(AdminRequiredMixin, TemplateView): + """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) diff --git a/passbook/core/templates/overview/base.html b/passbook/core/templates/overview/base.html index 973f5c136..c7c7b582e 100644 --- a/passbook/core/templates/overview/base.html +++ b/passbook/core/templates/overview/base.html @@ -172,6 +172,13 @@ +