prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Erreurs 404 non générées sur certaines pages
  Certaines pages devraient générées des erreurs 404 au lieu d'afficher le contenu des pages.
  J'ai découvert ce bug en voulant corriger des erreurs dans les liens sur la page des CGU, un oubli de mailto produit actuellement un lien vers http://zestedesavoir.com/pages/cgu/communication@zestedesavoir.com qui affiche la page des CGU. Or une erreur 404 devrait être générée. Peu importe la suite de l'URL cela fonctionne et ce pour plusieurs pages...
  Il manque un `$` à la fin de certaines expressions régulières dans zds/pages/urls.py.
  
  De plus le fichier urls.py importe pages.views mais ne l'utilise à aucun moment.
  Du coup je me demande si je supprime l'import de views (ligne 5) ou bien si j'utilise par exemple `views.about` au lieu de `'zds.pages.views.about'` ?
  
  Je veux bien bien me charger de faire une PR pour corriger ces bugs :)
  
  EDIT: Je n'arrive pas à m'assigner à cette issue (comme suggéré par CONTRIBUTING.md), problèmes de droits ?
  
  
  </issue>
  <code>
  [start of zds/pages/urls.py]
  1 # coding: utf-8
  2 
  3 from django.conf.urls import patterns, url
  4 
  5 from . import views
  6 
  7 
  8 urlpatterns = patterns('',
  9 
  10                        url(r'^apropos/$', 'zds.pages.views.about'),
  11                        url(r'^association/$', 'zds.pages.views.association'),
  12                        url(r'^contact/', 'zds.pages.views.contact'),
  13                        url(r'^cgu/', 'zds.pages.views.eula'),
  14                        url(r'^alertes/', 'zds.pages.views.alerts'),
  15                        url(r'^cookies/', 'zds.pages.views.cookies'),
  16                        url(r'^association/inscription/$', 'zds.pages.views.assoc_subscribe'),
  17 
  18                        url(r'^$', 'zds.pages.views.index'),
  19                        )
  20
  [end of zds/pages/urls.py]
  [start of zds/search/urls.py]
  1 # coding: utf-8
  2 
  3 from django.conf.urls import patterns, url
  4 
  5 from . import views
  6 from haystack.views import search_view_factory
  7 from zds.search.views import CustomSearchView
  8 from zds.search.forms import CustomSearchForm
  9 
  10 urlpatterns = patterns('haystack.views',
  11                        url(r'^$', search_view_factory(
  12                            view_class=CustomSearchView,
  13                            template='search/search.html',
  14                            form_class=CustomSearchForm
  15                        ), name='haystack_search'))
  16 
  17 urlpatterns += patterns('',
  18                         url(r'^opensearch.xml', 'zds.search.views.opensearch')
  19                         )
  20
  [end of zds/search/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/zds/pages/urls.py b/zds/pages/urls.py
  --- a/zds/pages/urls.py
  +++ b/zds/pages/urls.py
  @@ -2,17 +2,15 @@
   
   from django.conf.urls import patterns, url
   
  -from . import views
  -
   
   urlpatterns = patterns('',
   
                          url(r'^apropos/$', 'zds.pages.views.about'),
                          url(r'^association/$', 'zds.pages.views.association'),
  -                       url(r'^contact/', 'zds.pages.views.contact'),
  -                       url(r'^cgu/', 'zds.pages.views.eula'),
  -                       url(r'^alertes/', 'zds.pages.views.alerts'),
  -                       url(r'^cookies/', 'zds.pages.views.cookies'),
  +                       url(r'^contact/$', 'zds.pages.views.contact'),
  +                       url(r'^cgu/$', 'zds.pages.views.eula'),
  +                       url(r'^alertes/$', 'zds.pages.views.alerts'),
  +                       url(r'^cookies/$', 'zds.pages.views.cookies'),
                          url(r'^association/inscription/$', 'zds.pages.views.assoc_subscribe'),
   
                          url(r'^$', 'zds.pages.views.index'),
  diff --git a/zds/search/urls.py b/zds/search/urls.py
  --- a/zds/search/urls.py
  +++ b/zds/search/urls.py
  @@ -2,7 +2,6 @@
   
   from django.conf.urls import patterns, url
   
  -from . import views
   from haystack.views import search_view_factory
   from zds.search.views import CustomSearchView
   from zds.search.forms import CustomSearchForm
  @@ -15,5 +14,5 @@
                          ), name='haystack_search'))
   
   urlpatterns += patterns('',
  -                        url(r'^opensearch.xml', 'zds.search.views.opensearch')
  +                        url(r'^opensearch\.xml$', 'zds.search.views.opensearch')
                           )
  
verification_info: {"golden_diff": "diff --git a/zds/pages/urls.py b/zds/pages/urls.py\n--- a/zds/pages/urls.py\n+++ b/zds/pages/urls.py\n@@ -2,17 +2,15 @@\n \n from django.conf.urls import patterns, url\n \n-from . import views\n-\n \n urlpatterns = patterns('',\n \n                        url(r'^apropos/$', 'zds.pages.views.about'),\n                        url(r'^association/$', 'zds.pages.views.association'),\n-                       url(r'^contact/', 'zds.pages.views.contact'),\n-                       url(r'^cgu/', 'zds.pages.views.eula'),\n-                       url(r'^alertes/', 'zds.pages.views.alerts'),\n-                       url(r'^cookies/', 'zds.pages.views.cookies'),\n+                       url(r'^contact/$', 'zds.pages.views.contact'),\n+                       url(r'^cgu/$', 'zds.pages.views.eula'),\n+                       url(r'^alertes/$', 'zds.pages.views.alerts'),\n+                       url(r'^cookies/$', 'zds.pages.views.cookies'),\n                        url(r'^association/inscription/$', 'zds.pages.views.assoc_subscribe'),\n \n                        url(r'^$', 'zds.pages.views.index'),\ndiff --git a/zds/search/urls.py b/zds/search/urls.py\n--- a/zds/search/urls.py\n+++ b/zds/search/urls.py\n@@ -2,7 +2,6 @@\n \n from django.conf.urls import patterns, url\n \n-from . import views\n from haystack.views import search_view_factory\n from zds.search.views import CustomSearchView\n from zds.search.forms import CustomSearchForm\n@@ -15,5 +14,5 @@\n                        ), name='haystack_search'))\n \n urlpatterns += patterns('',\n-                        url(r'^opensearch.xml', 'zds.search.views.opensearch')\n+                        url(r'^opensearch\\.xml$', 'zds.search.views.opensearch')\n                         )\n", "issue": "Erreurs 404 non g\u00e9n\u00e9r\u00e9es sur certaines pages\nCertaines pages devraient g\u00e9n\u00e9r\u00e9es des erreurs 404 au lieu d'afficher le contenu des pages.\nJ'ai d\u00e9couvert ce bug en voulant corriger des erreurs dans les liens sur la page des CGU, un oubli de mailto produit actuellement un lien vers http://zestedesavoir.com/pages/cgu/communication@zestedesavoir.com qui affiche la page des CGU. Or une erreur 404 devrait \u00eatre g\u00e9n\u00e9r\u00e9e. Peu importe la suite de l'URL cela fonctionne et ce pour plusieurs pages...\nIl manque un `$` \u00e0 la fin de certaines expressions r\u00e9guli\u00e8res dans zds/pages/urls.py.\n\nDe plus le fichier urls.py importe pages.views mais ne l'utilise \u00e0 aucun moment.\nDu coup je me demande si je supprime l'import de views (ligne 5) ou bien si j'utilise par exemple `views.about` au lieu de `'zds.pages.views.about'` ?\n\nJe veux bien bien me charger de faire une PR pour corriger ces bugs :)\n\nEDIT: Je n'arrive pas \u00e0 m'assigner \u00e0 cette issue (comme sugg\u00e9r\u00e9 par CONTRIBUTING.md), probl\u00e8mes de droits ?\n\n", "before_files": [{"content": "# coding: utf-8\n\nfrom django.conf.urls import patterns, url\n\nfrom . import views\n\n\nurlpatterns = patterns('',\n\n                       url(r'^apropos/$', 'zds.pages.views.about'),\n                       url(r'^association/$', 'zds.pages.views.association'),\n                       url(r'^contact/', 'zds.pages.views.contact'),\n                       url(r'^cgu/', 'zds.pages.views.eula'),\n                       url(r'^alertes/', 'zds.pages.views.alerts'),\n                       url(r'^cookies/', 'zds.pages.views.cookies'),\n                       url(r'^association/inscription/$', 'zds.pages.views.assoc_subscribe'),\n\n                       url(r'^$', 'zds.pages.views.index'),\n                       )\n", "path": "zds/pages/urls.py"}, {"content": "# coding: utf-8\n\nfrom django.conf.urls import patterns, url\n\nfrom . import views\nfrom haystack.views import search_view_factory\nfrom zds.search.views import CustomSearchView\nfrom zds.search.forms import CustomSearchForm\n\nurlpatterns = patterns('haystack.views',\n                       url(r'^$', search_view_factory(\n                           view_class=CustomSearchView,\n                           template='search/search.html',\n                           form_class=CustomSearchForm\n                       ), name='haystack_search'))\n\nurlpatterns += patterns('',\n                        url(r'^opensearch.xml', 'zds.search.views.opensearch')\n                        )\n", "path": "zds/search/urls.py"}]}