django2.2: add exception parameter in forbidden and not_found views

This commit is contained in:
Antoine Bartuccio 2019-10-06 00:09:58 +02:00
parent b8c7fb6f74
commit 00bd60ef4f
Signed by: klmp200
GPG Key ID: E7245548C53F904B

View File

@ -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"))