prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  fix(django): Disable admin on prod
  Reported here: https://forum.sentry.io/t/sentry-django-admin-portal/12787?u=byk
  
  
  </issue>
  <code>
  [start of src/sentry/conf/urls.py]
  1 from __future__ import annotations
  2 
  3 from django.conf import settings
  4 from django.urls import URLPattern, URLResolver, re_path
  5 
  6 from sentry.web.frontend import csrf_failure
  7 from sentry.web.frontend.error_404 import Error404View
  8 from sentry.web.frontend.error_500 import Error500View
  9 from sentry.web.urls import urlpatterns as web_urlpatterns
  10 
  11 handler404 = Error404View.as_view()
  12 handler500 = Error500View.as_view()
  13 
  14 urlpatterns: list[URLResolver | URLPattern] = [
  15     re_path(
  16         r"^500/",
  17         handler500,
  18         name="error-500",
  19     ),
  20     re_path(
  21         r"^404/",
  22         handler404,
  23         name="error-404",
  24     ),
  25     re_path(
  26         r"^403-csrf-failure/",
  27         csrf_failure.view,
  28         name="error-403-csrf-failure",
  29     ),
  30 ]
  31 
  32 if "django.contrib.admin" in settings.INSTALLED_APPS:
  33     from sentry import django_admin
  34 
  35     urlpatterns += django_admin.urlpatterns
  36 
  37 urlpatterns += web_urlpatterns
  38
  [end of src/sentry/conf/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/src/sentry/conf/urls.py b/src/sentry/conf/urls.py
  --- a/src/sentry/conf/urls.py
  +++ b/src/sentry/conf/urls.py
  @@ -29,7 +29,7 @@
       ),
   ]
   
  -if "django.contrib.admin" in settings.INSTALLED_APPS:
  +if "django.contrib.admin" in settings.INSTALLED_APPS and settings.ADMIN_ENABLED:
       from sentry import django_admin
   
       urlpatterns += django_admin.urlpatterns
  
verification_info: {"golden_diff": "diff --git a/src/sentry/conf/urls.py b/src/sentry/conf/urls.py\n--- a/src/sentry/conf/urls.py\n+++ b/src/sentry/conf/urls.py\n@@ -29,7 +29,7 @@\n     ),\n ]\n \n-if \"django.contrib.admin\" in settings.INSTALLED_APPS:\n+if \"django.contrib.admin\" in settings.INSTALLED_APPS and settings.ADMIN_ENABLED:\n     from sentry import django_admin\n \n     urlpatterns += django_admin.urlpatterns\n", "issue": "fix(django): Disable admin on prod\nReported here: https://forum.sentry.io/t/sentry-django-admin-portal/12787?u=byk\n\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom django.conf import settings\nfrom django.urls import URLPattern, URLResolver, re_path\n\nfrom sentry.web.frontend import csrf_failure\nfrom sentry.web.frontend.error_404 import Error404View\nfrom sentry.web.frontend.error_500 import Error500View\nfrom sentry.web.urls import urlpatterns as web_urlpatterns\n\nhandler404 = Error404View.as_view()\nhandler500 = Error500View.as_view()\n\nurlpatterns: list[URLResolver | URLPattern] = [\n    re_path(\n        r\"^500/\",\n        handler500,\n        name=\"error-500\",\n    ),\n    re_path(\n        r\"^404/\",\n        handler404,\n        name=\"error-404\",\n    ),\n    re_path(\n        r\"^403-csrf-failure/\",\n        csrf_failure.view,\n        name=\"error-403-csrf-failure\",\n    ),\n]\n\nif \"django.contrib.admin\" in settings.INSTALLED_APPS:\n    from sentry import django_admin\n\n    urlpatterns += django_admin.urlpatterns\n\nurlpatterns += web_urlpatterns\n", "path": "src/sentry/conf/urls.py"}]}