From b69ebcd6b6942a4a04489835b127176f62c881d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 9 Oct 2023 22:29:29 +0200 Subject: [PATCH] =?UTF-8?q?U=20CSRF=20chyby=20m=C3=A1=20b=C3=BDt=20reason?= =?UTF-8?q?=20asi=20p=C5=99edvypln=C4=9Bn=C3=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- various/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/various/views.py b/various/views.py index 7bc3fccd..c6e46ab8 100644 --- a/various/views.py +++ b/various/views.py @@ -4,8 +4,8 @@ from django.shortcuts import render # Create your views here. -def csrf_error(request, reason): - """ Jednoduchý „template_view“ (třída to být nemůže) pro CSRF chyby """ +def csrf_error(request, reason=""): + """ Jednoduchý „template view“ (třída to být nemůže) pro CSRF chyby """ return render( request, 'various/403_csrf.html', {"url": request.META["HTTP_REFERER"], "reason": reason},