From 4c62bd33bee02ceb7da2a9b93180259f789d4ade Mon Sep 17 00:00:00 2001 From: Daniel Perrefort Date: Tue, 7 Jun 2022 18:38:01 -0400 Subject: [PATCH] Fixes typo in error codes passed to templates (#2) * Fixes typo in error codes passed to templates * Bumps the patch version --- django_easy_error/__init__.py | 2 +- django_easy_error/handlers.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/django_easy_error/__init__.py b/django_easy_error/__init__.py index 05527da..d85b988 100644 --- a/django_easy_error/__init__.py +++ b/django_easy_error/__init__.py @@ -118,7 +118,7 @@ from django.conf import settings -__version__ = '1.0.1' +__version__ = '1.0.2' __author__ = 'Daniel Perrefort' # Allow reloading of the module without Django raising an error diff --git a/django_easy_error/handlers.py b/django_easy_error/handlers.py index 625a4df..62620c5 100644 --- a/django_easy_error/handlers.py +++ b/django_easy_error/handlers.py @@ -15,13 +15,13 @@ def handler400(request: HttpRequest, exception: int) -> HttpResponse: """Render a response to a 400 error""" - return error_render(404, request) + return error_render(400, request) def handler403(request: HttpRequest, exception: int) -> HttpResponse: """Render a response to a 403 error""" - return error_render(404, request) + return error_render(403, request) def handler404(request: HttpRequest, exception: int) -> HttpResponse: @@ -33,4 +33,4 @@ def handler404(request: HttpRequest, exception: int) -> HttpResponse: def handler500(request: HttpRequest) -> HttpResponse: """Render a response to a 500 error""" - return error_render(404, request) + return error_render(500, request)