prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Cookiecutter bootstrap failure
  ## Bug Report
  
  **Problematic Behavior**
  The `nightly round` job warns us that there is a problem with cookiecutter template.
  
  **Additional context/Screenshots**
  [Add any other context about the problem here. If applicable, add screenshots to help explain.](https://app.circleci.com/pipelines/github/openfun/richie/6840/workflows/7b6bd5f9-e2d4-4ef1-8e54-4562a521d50d/jobs/183180)
  
  
  </issue>
  <code>
  [start of cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py]
  1 """
  2 {{cookiecutter.site}} urls
  3 """
  4 from django.conf import settings
  5 from django.conf.urls.i18n import i18n_patterns
  6 from django.contrib import admin
  7 from django.contrib.sitemaps.views import sitemap
  8 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
  9 from django.urls import include, path, re_path
  10 from django.views.generic import TemplateView
  11 from django.views.static import serve
  12 
  13 from cms.sitemaps import CMSSitemap
  14 from richie.apps.courses.urls import (
  15     redirects_urlpatterns as courses_redirects_urlpatterns,
  16     urlpatterns as courses_urlpatterns,
  17 )
  18 from richie.apps.search.urls import urlpatterns as search_urlpatterns
  19 from richie.plugins.urls import urlpatterns as plugins_urlpatterns
  20 
  21 # For now, we use URLPathVersioning to be consistent with fonzie. Fonzie uses it
  22 # because DRF OpenAPI only supports URLPathVersioning for now. See fonzie
  23 # API_PREFIX config for more information.
  24 API_PREFIX = r"v(?P<version>[0-9]+\.[0-9]+)"
  25 
  26 admin.autodiscover()
  27 admin.site.enable_nav_sidebar = False
  28 
  29 urlpatterns = [
  30     path(r"sitemap.xml", sitemap, {"sitemaps": {"cmspages": CMSSitemap}}),
  31     re_path(
  32         rf"api/{API_PREFIX:s}/",
  33         include([*courses_urlpatterns, *search_urlpatterns, *plugins_urlpatterns]),
  34     ),
  35     path(r"", include("filer.server.urls")),
  36     path(r"django-check-seo/", include("django_check_seo.urls")),
  37 ]
  38 
  39 urlpatterns += i18n_patterns(
  40     path(r"admin/", admin.site.urls),
  41     path(r"accounts/", include("django.contrib.auth.urls")),
  42     path(r"", include("cms.urls")),  # NOQA
  43 )
  44 
  45 # This is only needed when using runserver.
  46 if settings.DEBUG:
  47     urlpatterns = (
  48         [
  49             path(
  50                 r"styleguide/",
  51                 TemplateView.as_view(
  52                     template_name="richie/styleguide/index.html",
  53                     extra_context={"STYLEGUIDE": settings.STYLEGUIDE},
  54                 ),
  55                 name="styleguide",
  56             ),
  57             path(
  58                 r"media/<path:path>",
  59                 serve,
  60                 {"document_root": settings.MEDIA_ROOT, "show_indexes": True},
  61             ),
  62         ]
  63         + staticfiles_urlpatterns()
  64         + urlpatterns
  65     )
  66 
  67 handler400 = "richie.apps.core.views.error.error_400_view_handler"
  68 handler403 = "richie.apps.core.views.error.error_403_view_handler"
  69 handler404 = "richie.apps.core.views.error.error_404_view_handler"
  70 handler500 = "richie.apps.core.views.error.error_500_view_handler"
  71
  [end of cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/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/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py b/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py
  --- a/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py
  +++ b/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py
  @@ -11,10 +11,7 @@
   from django.views.static import serve
   
   from cms.sitemaps import CMSSitemap
  -from richie.apps.courses.urls import (
  -    redirects_urlpatterns as courses_redirects_urlpatterns,
  -    urlpatterns as courses_urlpatterns,
  -)
  +from richie.apps.courses.urls import urlpatterns as courses_urlpatterns
   from richie.apps.search.urls import urlpatterns as search_urlpatterns
   from richie.plugins.urls import urlpatterns as plugins_urlpatterns
  
verification_info: {"golden_diff": "diff --git a/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py b/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py\n--- a/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py\n+++ b/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py\n@@ -11,10 +11,7 @@\n from django.views.static import serve\n \n from cms.sitemaps import CMSSitemap\n-from richie.apps.courses.urls import (\n-    redirects_urlpatterns as courses_redirects_urlpatterns,\n-    urlpatterns as courses_urlpatterns,\n-)\n+from richie.apps.courses.urls import urlpatterns as courses_urlpatterns\n from richie.apps.search.urls import urlpatterns as search_urlpatterns\n from richie.plugins.urls import urlpatterns as plugins_urlpatterns\n", "issue": "Cookiecutter bootstrap failure\n## Bug Report\r\n\r\n**Problematic Behavior**\r\nThe `nightly round` job warns us that there is a problem with cookiecutter template.\r\n\r\n**Additional context/Screenshots**\r\n[Add any other context about the problem here. If applicable, add screenshots to help explain.](https://app.circleci.com/pipelines/github/openfun/richie/6840/workflows/7b6bd5f9-e2d4-4ef1-8e54-4562a521d50d/jobs/183180)\r\n\n", "before_files": [{"content": "\"\"\"\n{{cookiecutter.site}} urls\n\"\"\"\nfrom django.conf import settings\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.contrib import admin\nfrom django.contrib.sitemaps.views import sitemap\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.urls import include, path, re_path\nfrom django.views.generic import TemplateView\nfrom django.views.static import serve\n\nfrom cms.sitemaps import CMSSitemap\nfrom richie.apps.courses.urls import (\n    redirects_urlpatterns as courses_redirects_urlpatterns,\n    urlpatterns as courses_urlpatterns,\n)\nfrom richie.apps.search.urls import urlpatterns as search_urlpatterns\nfrom richie.plugins.urls import urlpatterns as plugins_urlpatterns\n\n# For now, we use URLPathVersioning to be consistent with fonzie. Fonzie uses it\n# because DRF OpenAPI only supports URLPathVersioning for now. See fonzie\n# API_PREFIX config for more information.\nAPI_PREFIX = r\"v(?P<version>[0-9]+\\.[0-9]+)\"\n\nadmin.autodiscover()\nadmin.site.enable_nav_sidebar = False\n\nurlpatterns = [\n    path(r\"sitemap.xml\", sitemap, {\"sitemaps\": {\"cmspages\": CMSSitemap}}),\n    re_path(\n        rf\"api/{API_PREFIX:s}/\",\n        include([*courses_urlpatterns, *search_urlpatterns, *plugins_urlpatterns]),\n    ),\n    path(r\"\", include(\"filer.server.urls\")),\n    path(r\"django-check-seo/\", include(\"django_check_seo.urls\")),\n]\n\nurlpatterns += i18n_patterns(\n    path(r\"admin/\", admin.site.urls),\n    path(r\"accounts/\", include(\"django.contrib.auth.urls\")),\n    path(r\"\", include(\"cms.urls\")),  # NOQA\n)\n\n# This is only needed when using runserver.\nif settings.DEBUG:\n    urlpatterns = (\n        [\n            path(\n                r\"styleguide/\",\n                TemplateView.as_view(\n                    template_name=\"richie/styleguide/index.html\",\n                    extra_context={\"STYLEGUIDE\": settings.STYLEGUIDE},\n                ),\n                name=\"styleguide\",\n            ),\n            path(\n                r\"media/<path:path>\",\n                serve,\n                {\"document_root\": settings.MEDIA_ROOT, \"show_indexes\": True},\n            ),\n        ]\n        + staticfiles_urlpatterns()\n        + urlpatterns\n    )\n\nhandler400 = \"richie.apps.core.views.error.error_400_view_handler\"\nhandler403 = \"richie.apps.core.views.error.error_403_view_handler\"\nhandler404 = \"richie.apps.core.views.error.error_404_view_handler\"\nhandler500 = \"richie.apps.core.views.error.error_500_view_handler\"\n", "path": "cookiecutter/{{cookiecutter.organization}}-richie-site-factory/template/{{cookiecutter.site}}/src/backend/{{cookiecutter.site}}/urls.py"}]}