Skip to content

Commit 828a7fc

Browse files
committed
Allow querystats view if DEBUG
1 parent 5d70225 commit 828a7fc

File tree

1 file changed

+8
-0
lines changed
  • plain-admin/plain/admin/querystats

1 file changed

+8
-0
lines changed

Diff for: plain-admin/plain/admin/querystats/views.py

+8
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
from plain.auth.views import AuthViewMixin
44
from plain.http import ResponseRedirect
5+
from plain.runtime import settings
56
from plain.views import TemplateView
67

78

89
class QuerystatsView(AuthViewMixin, TemplateView):
910
template_name = "querystats/querystats.html"
1011
admin_required = True
1112

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+
1220
def get_template_context(self):
1321
context = super().get_template_context()
1422

0 commit comments

Comments
 (0)