Compare commits
2 commits
60346d6839
...
0e24c1d9ad
Author | SHA1 | Date | |
---|---|---|---|
0e24c1d9ad | |||
29b3271200 |
1 changed files with 3 additions and 0 deletions
|
@ -1,10 +1,13 @@
|
||||||
|
from django.http import HttpResponseForbidden
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
|
||||||
|
|
||||||
def csrf_error(request, reason):
|
def csrf_error(request, reason):
|
||||||
|
""" Jednoduchý „template_view“ (třída to být nesmůže) pro CSRF chyby """
|
||||||
return render(
|
return render(
|
||||||
request, 'various/403_csrf.html',
|
request, 'various/403_csrf.html',
|
||||||
{"url": request.META["HTTP_REFERER"], "reason": reason},
|
{"url": request.META["HTTP_REFERER"], "reason": reason},
|
||||||
|
status=HttpResponseForbidden.status_code,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue