1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #34377 -- Fixed preserving query strings in AdminSite.catch_all_view().

Included full path when redirecting with append slash to include query
strings.

Regression in ba31b01034.
This commit is contained in:
Dominique Bischof
2023-03-02 14:03:50 -05:00
committed by Mariusz Felisiak
parent 4338b6526d
commit 17e08b2177
2 changed files with 39 additions and 1 deletions

View File

@@ -453,7 +453,9 @@ class AdminSite:
pass
else:
if getattr(match.func, "should_append_slash", True):
return HttpResponsePermanentRedirect("%s/" % request.path)
return HttpResponsePermanentRedirect(
request.get_full_path(force_append_slash=True)
)
raise Http404
def _build_app_dict(self, request, label=None):