mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
django2.2: add exception parameter in forbidden and not_found views
This commit is contained in:
parent
b8c7fb6f74
commit
00bd60ef4f
@ -48,7 +48,7 @@ from core.models import Group
|
|||||||
from core.views.forms import LoginForm
|
from core.views.forms import LoginForm
|
||||||
|
|
||||||
|
|
||||||
def forbidden(request):
|
def forbidden(request, exception):
|
||||||
try:
|
try:
|
||||||
return HttpResponseForbidden(
|
return HttpResponseForbidden(
|
||||||
render(
|
render(
|
||||||
@ -71,7 +71,7 @@ def forbidden(request):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def not_found(request):
|
def not_found(request, exception):
|
||||||
return HttpResponseNotFound(render(request, "core/404.jinja"))
|
return HttpResponseNotFound(render(request, "core/404.jinja"))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user