-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
""" | ||
© Ocado Group | ||
Created on 16/09/2024 at 15:23:05(+01:00). | ||
""" | ||
|
||
from .handlers import handler400, handler403, handler404, handler500 | ||
from .patterns import get_urlpatterns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
© Ocado Group | ||
Created on 16/09/2024 at 15:19:54(+01:00). | ||
Custom error handlers which override django's default behavior to render a | ||
template. | ||
https://docs.djangoproject.com/en/3.2/ref/urls/#module-django.conf.urls | ||
""" | ||
|
||
from django.http import ( | ||
HttpResponseBadRequest, | ||
HttpResponseForbidden, | ||
HttpResponseNotFound, | ||
HttpResponseServerError, | ||
) | ||
|
||
handler400 = lambda request: HttpResponseBadRequest() | ||
handler403 = lambda request: HttpResponseForbidden() | ||
handler404 = lambda request: HttpResponseNotFound() | ||
handler500 = lambda request: HttpResponseServerError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters