Web M&M
https://mam.matfyz.cz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
371 B
12 lines
371 B
1 year ago
|
from django.http import HttpResponseForbidden
|
||
4 years ago
|
from django.shortcuts import render
|
||
|
|
||
1 year ago
|
|
||
1 year ago
|
def csrf_error(request, reason=""):
|
||
|
""" Jednoduchý „template view“ (třída to být nemůže) pro CSRF chyby """
|
||
1 year ago
|
return render(
|
||
|
request, 'various/403_csrf.html',
|
||
1 year ago
|
{"url": request.META.get("HTTP_REFERER", None), "reason": reason},
|
||
1 year ago
|
status=HttpResponseForbidden.status_code,
|
||
1 year ago
|
)
|