prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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
  
  </issue>
  <code>
  [start of website/partners/api/v2/urls.py]
  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 of website/partners/api/v2/urls.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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",
       ),
  
verification_info: {"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"}]}