We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make API redirects respect query params
<!--

Please add the appropriate label for what change should be made:
docs: changes to the documentation)
refactor: refactoring production code, eg. renaming a variable or rewriting a function
test: adding missing tests, refactoring tests; no production code change
chore: updating poetry etc; no production code change

-->

### Describe the change
As seen in #2828 and #2821, some old API endpoints are redirected to their new replacements. This redirection does not propagate any query parameters. It would be nice to pass query parameters along when redirecting to a replacement API endpoint to prevent breaking consumers.

### Motivation
#2828 #2821

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `website/partners/api/v2/urls.py`
Content:
```
1 """Partners app API v2 urls."""
2 from django.urls import path
3 from django.views.generic import RedirectView
4 
5 from partners.api.v2.views import (
6     PartnerDetailView,
7     PartnerListView,
8     VacancyCategoryListView,
9     VacancyDetailView,
10     VacancyListView,
11 )
12 
13 app_name = "partners"
14 
15 urlpatterns = [
16     path(
17         "partners/events/",
18         RedirectView.as_view(
19             pattern_name="api:v2:events:external-events-list", permanent=False
20         ),
21         name="partner-events-list",
22     ),
23     path(
24         "partners/events/<int:pk>/",
25         RedirectView.as_view(
26             pattern_name="api:v2:events:external-event-detail", permanent=False
27         ),
28         name="partner-events-detail",
29     ),
30     path("partners/vacancies/", VacancyListView.as_view(), name="vacancies-list"),
31     path(
32         "partners/vacancies/categories/",
33         VacancyCategoryListView.as_view(),
34         name="vacancy-categories-list",
35     ),
36     path(
37         "partners/vacancies/<int:pk>/",
38         VacancyDetailView.as_view(),
39         name="vacancies-detail",
40     ),
41     path("partners/", PartnerListView.as_view(), name="partners-list"),
42     path("partners/<int:pk>/", PartnerDetailView.as_view(), name="partners-detail"),
43 ]
44
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/website/partners/api/v2/urls.py b/website/partners/api/v2/urls.py
--- a/website/partners/api/v2/urls.py
+++ b/website/partners/api/v2/urls.py
@@ -16,14 +16,18 @@
     path(
         "partners/events/",
         RedirectView.as_view(
-            pattern_name="api:v2:events:external-events-list", permanent=False
+            pattern_name="api:v2:events:external-events-list",
+            permanent=False,
+            query_string=True,
         ),
         name="partner-events-list",
     ),
     path(
         "partners/events/<int:pk>/",
         RedirectView.as_view(
-            pattern_name="api:v2:events:external-event-detail", permanent=False
+            pattern_name="api:v2:events:external-event-detail",
+            permanent=False,
+            query_string=True,
         ),
         name="partner-events-detail",
     ),

{"golden_diff": "diff --git a/website/partners/api/v2/urls.py b/website/partners/api/v2/urls.py\n--- a/website/partners/api/v2/urls.py\n+++ b/website/partners/api/v2/urls.py\n@@ -16,14 +16,18 @@\n     path(\n         \"partners/events/\",\n         RedirectView.as_view(\n-            pattern_name=\"api:v2:events:external-events-list\", permanent=False\n+            pattern_name=\"api:v2:events:external-events-list\",\n+            permanent=False,\n+            query_string=True,\n         ),\n         name=\"partner-events-list\",\n     ),\n     path(\n         \"partners/events/<int:pk>/\",\n         RedirectView.as_view(\n-            pattern_name=\"api:v2:events:external-event-detail\", permanent=False\n+            pattern_name=\"api:v2:events:external-event-detail\",\n+            permanent=False,\n+            query_string=True,\n         ),\n         name=\"partner-events-detail\",\n     ),\n", "issue": "Make API redirects respect query params\n<!--\n\nPlease add the appropriate label for what change should be made:\ndocs: changes to the documentation)\nrefactor: refactoring production code, eg. renaming a variable or rewriting a function\ntest: adding missing tests, refactoring tests; no production code change\nchore: updating poetry etc; no production code change\n\n-->\n\n### Describe the change\nAs seen in #2828 and #2821, some old API endpoints are redirected to their new replacements. This redirection does not propagate any query parameters. It would be nice to pass query parameters along when redirecting to a replacement API endpoint to prevent breaking consumers.\n\n### Motivation\n#2828 #2821\n", "before_files": [{"content": "\"\"\"Partners app API v2 urls.\"\"\"\nfrom django.urls import path\nfrom django.views.generic import RedirectView\n\nfrom partners.api.v2.views import (\n    PartnerDetailView,\n    PartnerListView,\n    VacancyCategoryListView,\n    VacancyDetailView,\n    VacancyListView,\n)\n\napp_name = \"partners\"\n\nurlpatterns = [\n    path(\n        \"partners/events/\",\n        RedirectView.as_view(\n            pattern_name=\"api:v2:events:external-events-list\", permanent=False\n        ),\n        name=\"partner-events-list\",\n    ),\n    path(\n        \"partners/events/<int:pk>/\",\n        RedirectView.as_view(\n            pattern_name=\"api:v2:events:external-event-detail\", permanent=False\n        ),\n        name=\"partner-events-detail\",\n    ),\n    path(\"partners/vacancies/\", VacancyListView.as_view(), name=\"vacancies-list\"),\n    path(\n        \"partners/vacancies/categories/\",\n        VacancyCategoryListView.as_view(),\n        name=\"vacancy-categories-list\",\n    ),\n    path(\n        \"partners/vacancies/<int:pk>/\",\n        VacancyDetailView.as_view(),\n        name=\"vacancies-detail\",\n    ),\n    path(\"partners/\", PartnerListView.as_view(), name=\"partners-list\"),\n    path(\"partners/<int:pk>/\", PartnerDetailView.as_view(), name=\"partners-detail\"),\n]\n", "path": "website/partners/api/v2/urls.py"}], "after_files": [{"content": "\"\"\"Partners app API v2 urls.\"\"\"\nfrom django.urls import path\nfrom django.views.generic import RedirectView\n\nfrom partners.api.v2.views import (\n    PartnerDetailView,\n    PartnerListView,\n    VacancyCategoryListView,\n    VacancyDetailView,\n    VacancyListView,\n)\n\napp_name = \"partners\"\n\nurlpatterns = [\n    path(\n        \"partners/events/\",\n        RedirectView.as_view(\n            pattern_name=\"api:v2:events:external-events-list\",\n            permanent=False,\n            query_string=True,\n        ),\n        name=\"partner-events-list\",\n    ),\n    path(\n        \"partners/events/<int:pk>/\",\n        RedirectView.as_view(\n            pattern_name=\"api:v2:events:external-event-detail\",\n            permanent=False,\n            query_string=True,\n        ),\n        name=\"partner-events-detail\",\n    ),\n    path(\"partners/vacancies/\", VacancyListView.as_view(), name=\"vacancies-list\"),\n    path(\n        \"partners/vacancies/categories/\",\n        VacancyCategoryListView.as_view(),\n        name=\"vacancy-categories-list\",\n    ),\n    path(\n        \"partners/vacancies/<int:pk>/\",\n        VacancyDetailView.as_view(),\n        name=\"vacancies-detail\",\n    ),\n    path(\"partners/\", PartnerListView.as_view(), name=\"partners-list\"),\n    path(\"partners/<int:pk>/\", PartnerDetailView.as_view(), name=\"partners-detail\"),\n]\n", "path": "website/partners/api/v2/urls.py"}]}