We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN 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 ?


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `zds/pages/urls.py`
Content:
```
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
```

Path: `zds/search/urls.py`
Content:
```
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 FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

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')
                         )

{"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"}], "after_files": [{"content": "# coding: utf-8\n\nfrom django.conf.urls import patterns, url\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 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"}]}