From 61a0fa15c2c0c7667487ddc944092fde87eb08d3 Mon Sep 17 00:00:00 2001 From: Horilla Date: Thu, 13 Jun 2024 11:21:42 +0530 Subject: [PATCH] [UPDT] HORILLA: htmx method not allowed function updation to error page --- horilla/decorators.py | 55 +------------------------------------------ 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/horilla/decorators.py b/horilla/decorators.py index eaad10b88..587c4d032 100755 --- a/horilla/decorators.py +++ b/horilla/decorators.py @@ -216,60 +216,7 @@ def hx_request_required(view_func): def wrapped_view(request, *args, **kwargs): key = "HTTP_HX_REQUEST" if key not in request.META.keys(): - html_content = """ - - - - - - Method Not Allowed - - - -
-

405 Method Not Allowed

-

The request method is not allowed. Please make sure you are sending a proper request.

- Go Back to Home -
- - - """ - return HttpResponse(html_content, content_type="text/html", status=405) + return render(request, "405.html") return view_func(request, *args, **kwargs) return wrapped_view