We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d70225 commit 828a7fcCopy full SHA for 828a7fc
plain-admin/plain/admin/querystats/views.py
@@ -2,13 +2,21 @@
2
3
from plain.auth.views import AuthViewMixin
4
from plain.http import ResponseRedirect
5
+from plain.runtime import settings
6
from plain.views import TemplateView
7
8
9
class QuerystatsView(AuthViewMixin, TemplateView):
10
template_name = "querystats/querystats.html"
11
admin_required = True
12
13
+ def check_auth(self):
14
+ # Allow the view if we're in DEBUG
15
+ if settings.DEBUG:
16
+ return
17
+
18
+ super().check_auth()
19
20
def get_template_context(self):
21
context = super().get_template_context()
22
0 commit comments