1
0
Fork 0
mirror of https://github.com/Findus23/RPGnotes.git synced 2024-09-19 15:43:45 +02:00

improve status code

This commit is contained in:
Lukas Winkler 2023-05-28 13:03:12 +02:00
parent 6f78207f7e
commit 769490c5ab
Signed by: lukas
GPG key ID: 54DE4D798D244853

View file

@ -27,7 +27,7 @@ class AuthMiddleware:
if request.method in {"GET", "HEAD"} or request.path.startswith("/i18n/setlang"):
return self.get_response(request)
elif not current_user.is_authenticated:
r = TemplateResponse(request, "common/demo_readonly.jinja")
r = TemplateResponse(request, "common/demo_readonly.jinja", status=405)
r.render()
return r
if not current_user.is_authenticated: