From 29b327120049d0bee64f220443939a68ebae7f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 9 Oct 2023 22:02:05 +0200 Subject: [PATCH] =?UTF-8?q?CSRF=20chyba=20m=C3=A1=20vr=C3=A1tit=20403?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- various/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/various/views.py b/various/views.py index 3e5e1a5a..9bb6b109 100644 --- a/various/views.py +++ b/various/views.py @@ -1,3 +1,4 @@ +from django.http import HttpResponseForbidden from django.shortcuts import render # Create your views here. @@ -7,4 +8,5 @@ def csrf_error(request, reason): return render( request, 'various/403_csrf.html', {"url": request.META["HTTP_REFERER"], "reason": reason}, + status=HttpResponseForbidden.status_code, )