prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Robots.txt is missing from urls.py
  # Impacted versions
  
  * Modoboa: 1.12.2 and older
  * installer used: Yes, but some modifications made
  * Webserver: Nginx
  
  # Steps to reproduce
  Install modoboa and enable webinterface.
  
  # Current behavior
  No robots.txt is defined. Search engines do not now how to index the website. When search engines try to find robots.txt an 404 is raised and the error is mailed to ADMINS (if configured)
  
  # Expected behavior
  Robots.txt in urls.py defined, to deny all traffic, as webmail should not be publicly indexed by search engines. Possible fix, add:
  `path('robots.txt', lambda r: HttpResponse("User-agent: *\nDisAllow: /", content_type="text/plain"), name='robots')`
  
  # Video/Screenshot link (optional)
  
  
  
  </issue>
  <code>
  [start of modoboa/core/urls.py]
  1 """Core urls."""
  2 
  3 from django.urls import path
  4 
  5 from . import views
  6 
  7 app_name = "core"
  8 
  9 urlpatterns = [
  10     path('', views.RootDispatchView.as_view(), name="root"),
  11     path('dashboard/', views.DashboardView.as_view(), name="dashboard"),
  12 
  13     path('accounts/login/', views.dologin, name="login"),
  14     path('accounts/logout/', views.dologout, name="logout"),
  15     path('accounts/2fa_verify/',
  16          views.TwoFactorCodeVerifyView.as_view(),
  17          name='2fa_verify'),
  18 
  19     path('core/', views.viewsettings, name="index"),
  20     path('core/parameters/', views.parameters, name="parameters"),
  21     path('core/info/', views.information, name="information"),
  22     path('core/logs/', views.logs, name="log_list"),
  23     path('core/logs/page/', views.logs_page, name="logs_page"),
  24     path('core/top_notifications/check/',
  25          views.check_top_notifications,
  26          name="top_notifications_check"),
  27 
  28     path('user/', views.index, name="user_index"),
  29     path('user/preferences/', views.preferences,
  30          name="user_preferences"),
  31     path('user/profile/', views.profile, name="user_profile"),
  32     path('user/api/', views.api_access, name="user_api_access"),
  33     path('user/security/', views.security, name="user_security"),
  34 ]
  35
  [end of modoboa/core/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/modoboa/core/urls.py b/modoboa/core/urls.py
  --- a/modoboa/core/urls.py
  +++ b/modoboa/core/urls.py
  @@ -1,6 +1,7 @@
   """Core urls."""
   
   from django.urls import path
  +from django.views.generic.base import TemplateView
   
   from . import views
   
  @@ -31,4 +32,5 @@
       path('user/profile/', views.profile, name="user_profile"),
       path('user/api/', views.api_access, name="user_api_access"),
       path('user/security/', views.security, name="user_security"),
  +    path('robots.txt', TemplateView.as_view(template_name="core/robots.txt", content_type="text/plain")),
   ]
  
verification_info: {"golden_diff": "diff --git a/modoboa/core/urls.py b/modoboa/core/urls.py\n--- a/modoboa/core/urls.py\n+++ b/modoboa/core/urls.py\n@@ -1,6 +1,7 @@\n \"\"\"Core urls.\"\"\"\n \n from django.urls import path\n+from django.views.generic.base import TemplateView\n \n from . import views\n \n@@ -31,4 +32,5 @@\n     path('user/profile/', views.profile, name=\"user_profile\"),\n     path('user/api/', views.api_access, name=\"user_api_access\"),\n     path('user/security/', views.security, name=\"user_security\"),\n+    path('robots.txt', TemplateView.as_view(template_name=\"core/robots.txt\", content_type=\"text/plain\")),\n ]\n", "issue": "Robots.txt is missing from urls.py\n# Impacted versions\r\n\r\n* Modoboa: 1.12.2 and older\r\n* installer used: Yes, but some modifications made\r\n* Webserver: Nginx\r\n\r\n# Steps to reproduce\r\nInstall modoboa and enable webinterface.\r\n\r\n# Current behavior\r\nNo robots.txt is defined. Search engines do not now how to index the website. When search engines try to find robots.txt an 404 is raised and the error is mailed to ADMINS (if configured)\r\n\r\n# Expected behavior\r\nRobots.txt in urls.py defined, to deny all traffic, as webmail should not be publicly indexed by search engines. Possible fix, add:\r\n`path('robots.txt', lambda r: HttpResponse(\"User-agent: *\\nDisAllow: /\", content_type=\"text/plain\"), name='robots')`\r\n\r\n# Video/Screenshot link (optional)\r\n\r\n\n", "before_files": [{"content": "\"\"\"Core urls.\"\"\"\n\nfrom django.urls import path\n\nfrom . import views\n\napp_name = \"core\"\n\nurlpatterns = [\n    path('', views.RootDispatchView.as_view(), name=\"root\"),\n    path('dashboard/', views.DashboardView.as_view(), name=\"dashboard\"),\n\n    path('accounts/login/', views.dologin, name=\"login\"),\n    path('accounts/logout/', views.dologout, name=\"logout\"),\n    path('accounts/2fa_verify/',\n         views.TwoFactorCodeVerifyView.as_view(),\n         name='2fa_verify'),\n\n    path('core/', views.viewsettings, name=\"index\"),\n    path('core/parameters/', views.parameters, name=\"parameters\"),\n    path('core/info/', views.information, name=\"information\"),\n    path('core/logs/', views.logs, name=\"log_list\"),\n    path('core/logs/page/', views.logs_page, name=\"logs_page\"),\n    path('core/top_notifications/check/',\n         views.check_top_notifications,\n         name=\"top_notifications_check\"),\n\n    path('user/', views.index, name=\"user_index\"),\n    path('user/preferences/', views.preferences,\n         name=\"user_preferences\"),\n    path('user/profile/', views.profile, name=\"user_profile\"),\n    path('user/api/', views.api_access, name=\"user_api_access\"),\n    path('user/security/', views.security, name=\"user_security\"),\n]\n", "path": "modoboa/core/urls.py"}]}