We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
in portal/rr, when you are redirected to home, you are redirected to AI:MMO home
The website now loads the aimmo urls.
But now each time the website is supposed to redirect you to the portal home, it redirects to the AI:MMO login page.
Probably because both urls are named the same in their respective urls.py and the website imports both, finishing with aimmo urls?


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `players/autoconfig.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 # Code for Life
3 #
4 # Copyright (C) 2015, Ocado Innovation Limited
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as
8 # published by the Free Software Foundation, either version 3 of the
9 # License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU Affero General Public License for more details.
15 #
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 #
19 # ADDITIONAL TERMS – Section 7 GNU General Public Licence
20 #
21 # This licence does not grant any right, title or interest in any “Ocado” logos,
22 # trade names or the trademark “Ocado” or any other trademarks or domain names
23 # owned by Ocado Innovation Limited or the Ocado group of companies or any other
24 # distinctive brand features of “Ocado” as may be secured from time to time. You
25 # must not distribute any modification of this program using the trademark
26 # “Ocado” or claim any affiliation or association with Ocado or its employees.
27 #
28 # You are not authorised to use the name Ocado (or any of its trade names) or
29 # the names of any author or contributor in advertising or for publicity purposes
30 # pertaining to the distribution of this program, without the prior written
31 # authorisation of Ocado.
32 #
33 # Any propagation, distribution or conveyance of this program must include this
34 # copyright notice and these terms. You must not misrepresent the origins of this
35 # program; modified versions of the program must be marked as such and not
36 # identified as the original program.
37 '''Players autoconfig'''
38 
39 DEFAULT_SETTINGS = {
40     'AUTOCONFIG_INDEX_VIEW': 'home',
41     'STATIC_URL': '/static/',
42 }
43 
44 SETTINGS = {
45     'INSTALLED_APPS': [
46         'django.contrib.auth',
47         'django.contrib.messages',
48         'django.contrib.staticfiles',
49         'django_js_reverse',
50     ],
51     'TEMPLATES': [
52         {
53             'BACKEND': 'django.template.backends.django.DjangoTemplates',
54             'APP_DIRS': True,
55             'OPTIONS': {
56                 'context_processors': [
57                     'django.template.context_processors.debug',
58                     'django.template.context_processors.request',
59                     'django.contrib.auth.context_processors.auth',
60                     'django.contrib.messages.context_processors.messages',
61                 ]
62             }
63         }
64     ],
65     'USE_TZ': True,
66 }
67
```

Path: `players/urls.py`
Content:
```
1 from django.conf.urls import url
2 from django.views.generic import TemplateView
3 from django.contrib.auth.decorators import login_required
4 from django.contrib.admin.views.decorators import staff_member_required
5 
6 from players import views
7 
8 urlpatterns = [
9     url(r'^$', staff_member_required(TemplateView.as_view(template_name='players/home.html')), name='home'),
10 
11     url(r'^program/$', staff_member_required(login_required(TemplateView.as_view(template_name='players/program.html'))), name='program'),
12     url(r'^watch/$', staff_member_required(views.WatchView.as_view()), name='watch'),
13     url(r'^statistics/$', staff_member_required(TemplateView.as_view(template_name='players/statistics.html')), name='statistics'),
14 
15     url(r'^api/code/$', staff_member_required(views.code), name='code'),
16     url(r'^api/games/$', views.games, name='games'),
17 
18     url(r'^jsreverse/$', 'django_js_reverse.views.urls_js', name='js_reverse'),  # TODO: Pull request to make django_js_reverse.urls
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/players/autoconfig.py b/players/autoconfig.py
--- a/players/autoconfig.py
+++ b/players/autoconfig.py
@@ -37,7 +37,7 @@
 '''Players autoconfig'''
 
 DEFAULT_SETTINGS = {
-    'AUTOCONFIG_INDEX_VIEW': 'home',
+    'AUTOCONFIG_INDEX_VIEW': 'aimmo/home',
     'STATIC_URL': '/static/',
 }
 
diff --git a/players/urls.py b/players/urls.py
--- a/players/urls.py
+++ b/players/urls.py
@@ -6,14 +6,14 @@
 from players import views
 
 urlpatterns = [
-    url(r'^$', staff_member_required(TemplateView.as_view(template_name='players/home.html')), name='home'),
+    url(r'^$', staff_member_required(TemplateView.as_view(template_name='players/home.html')), name='aimmo/home'),
 
-    url(r'^program/$', staff_member_required(login_required(TemplateView.as_view(template_name='players/program.html'))), name='program'),
-    url(r'^watch/$', staff_member_required(views.WatchView.as_view()), name='watch'),
-    url(r'^statistics/$', staff_member_required(TemplateView.as_view(template_name='players/statistics.html')), name='statistics'),
+    url(r'^program/$', staff_member_required(login_required(TemplateView.as_view(template_name='players/program.html'))), name='aimmo/program'),
+    url(r'^watch/$', staff_member_required(views.WatchView.as_view()), name='aimmo/watch'),
+    url(r'^statistics/$', staff_member_required(TemplateView.as_view(template_name='players/statistics.html')), name='aimmo/statistics'),
 
-    url(r'^api/code/$', staff_member_required(views.code), name='code'),
-    url(r'^api/games/$', views.games, name='games'),
+    url(r'^api/code/$', staff_member_required(views.code), name='aimmo/code'),
+    url(r'^api/games/$', views.games, name='aimmo/games'),
 
-    url(r'^jsreverse/$', 'django_js_reverse.views.urls_js', name='js_reverse'),  # TODO: Pull request to make django_js_reverse.urls
+    url(r'^jsreverse/$', 'django_js_reverse.views.urls_js', name='aimmo/js_reverse'),  # TODO: Pull request to make django_js_reverse.urls
 ]

{"golden_diff": "diff --git a/players/autoconfig.py b/players/autoconfig.py\n--- a/players/autoconfig.py\n+++ b/players/autoconfig.py\n@@ -37,7 +37,7 @@\n '''Players autoconfig'''\n \n DEFAULT_SETTINGS = {\n-    'AUTOCONFIG_INDEX_VIEW': 'home',\n+    'AUTOCONFIG_INDEX_VIEW': 'aimmo/home',\n     'STATIC_URL': '/static/',\n }\n \ndiff --git a/players/urls.py b/players/urls.py\n--- a/players/urls.py\n+++ b/players/urls.py\n@@ -6,14 +6,14 @@\n from players import views\n \n urlpatterns = [\n-    url(r'^$', staff_member_required(TemplateView.as_view(template_name='players/home.html')), name='home'),\n+    url(r'^$', staff_member_required(TemplateView.as_view(template_name='players/home.html')), name='aimmo/home'),\n \n-    url(r'^program/$', staff_member_required(login_required(TemplateView.as_view(template_name='players/program.html'))), name='program'),\n-    url(r'^watch/$', staff_member_required(views.WatchView.as_view()), name='watch'),\n-    url(r'^statistics/$', staff_member_required(TemplateView.as_view(template_name='players/statistics.html')), name='statistics'),\n+    url(r'^program/$', staff_member_required(login_required(TemplateView.as_view(template_name='players/program.html'))), name='aimmo/program'),\n+    url(r'^watch/$', staff_member_required(views.WatchView.as_view()), name='aimmo/watch'),\n+    url(r'^statistics/$', staff_member_required(TemplateView.as_view(template_name='players/statistics.html')), name='aimmo/statistics'),\n \n-    url(r'^api/code/$', staff_member_required(views.code), name='code'),\n-    url(r'^api/games/$', views.games, name='games'),\n+    url(r'^api/code/$', staff_member_required(views.code), name='aimmo/code'),\n+    url(r'^api/games/$', views.games, name='aimmo/games'),\n \n-    url(r'^jsreverse/$', 'django_js_reverse.views.urls_js', name='js_reverse'),  # TODO: Pull request to make django_js_reverse.urls\n+    url(r'^jsreverse/$', 'django_js_reverse.views.urls_js', name='aimmo/js_reverse'),  # TODO: Pull request to make django_js_reverse.urls\n ]\n", "issue": "in portal/rr, when you are redirected to home, you are redirected to AI:MMO home\nThe website now loads the aimmo urls.\nBut now each time the website is supposed to redirect you to the portal home, it redirects to the AI:MMO login page.\nProbably because both urls are named the same in their respective urls.py and the website imports both, finishing with aimmo urls?\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# Code for Life\n#\n# Copyright (C) 2015, Ocado Innovation Limited\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU Affero General Public License for more details.\n#\n# You should have received a copy of the GNU Affero General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n# ADDITIONAL TERMS \u2013 Section 7 GNU General Public Licence\n#\n# This licence does not grant any right, title or interest in any \u201cOcado\u201d logos,\n# trade names or the trademark \u201cOcado\u201d or any other trademarks or domain names\n# owned by Ocado Innovation Limited or the Ocado group of companies or any other\n# distinctive brand features of \u201cOcado\u201d as may be secured from time to time. You\n# must not distribute any modification of this program using the trademark\n# \u201cOcado\u201d or claim any affiliation or association with Ocado or its employees.\n#\n# You are not authorised to use the name Ocado (or any of its trade names) or\n# the names of any author or contributor in advertising or for publicity purposes\n# pertaining to the distribution of this program, without the prior written\n# authorisation of Ocado.\n#\n# Any propagation, distribution or conveyance of this program must include this\n# copyright notice and these terms. You must not misrepresent the origins of this\n# program; modified versions of the program must be marked as such and not\n# identified as the original program.\n'''Players autoconfig'''\n\nDEFAULT_SETTINGS = {\n    'AUTOCONFIG_INDEX_VIEW': 'home',\n    'STATIC_URL': '/static/',\n}\n\nSETTINGS = {\n    'INSTALLED_APPS': [\n        'django.contrib.auth',\n        'django.contrib.messages',\n        'django.contrib.staticfiles',\n        'django_js_reverse',\n    ],\n    'TEMPLATES': [\n        {\n            'BACKEND': 'django.template.backends.django.DjangoTemplates',\n            'APP_DIRS': True,\n            'OPTIONS': {\n                'context_processors': [\n                    'django.template.context_processors.debug',\n                    'django.template.context_processors.request',\n                    'django.contrib.auth.context_processors.auth',\n                    'django.contrib.messages.context_processors.messages',\n                ]\n            }\n        }\n    ],\n    'USE_TZ': True,\n}\n", "path": "players/autoconfig.py"}, {"content": "from django.conf.urls import url\nfrom django.views.generic import TemplateView\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.admin.views.decorators import staff_member_required\n\nfrom players import views\n\nurlpatterns = [\n    url(r'^$', staff_member_required(TemplateView.as_view(template_name='players/home.html')), name='home'),\n\n    url(r'^program/$', staff_member_required(login_required(TemplateView.as_view(template_name='players/program.html'))), name='program'),\n    url(r'^watch/$', staff_member_required(views.WatchView.as_view()), name='watch'),\n    url(r'^statistics/$', staff_member_required(TemplateView.as_view(template_name='players/statistics.html')), name='statistics'),\n\n    url(r'^api/code/$', staff_member_required(views.code), name='code'),\n    url(r'^api/games/$', views.games, name='games'),\n\n    url(r'^jsreverse/$', 'django_js_reverse.views.urls_js', name='js_reverse'),  # TODO: Pull request to make django_js_reverse.urls\n]\n", "path": "players/urls.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n# Code for Life\n#\n# Copyright (C) 2015, Ocado Innovation Limited\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU Affero General Public License for more details.\n#\n# You should have received a copy of the GNU Affero General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n# ADDITIONAL TERMS \u2013 Section 7 GNU General Public Licence\n#\n# This licence does not grant any right, title or interest in any \u201cOcado\u201d logos,\n# trade names or the trademark \u201cOcado\u201d or any other trademarks or domain names\n# owned by Ocado Innovation Limited or the Ocado group of companies or any other\n# distinctive brand features of \u201cOcado\u201d as may be secured from time to time. You\n# must not distribute any modification of this program using the trademark\n# \u201cOcado\u201d or claim any affiliation or association with Ocado or its employees.\n#\n# You are not authorised to use the name Ocado (or any of its trade names) or\n# the names of any author or contributor in advertising or for publicity purposes\n# pertaining to the distribution of this program, without the prior written\n# authorisation of Ocado.\n#\n# Any propagation, distribution or conveyance of this program must include this\n# copyright notice and these terms. You must not misrepresent the origins of this\n# program; modified versions of the program must be marked as such and not\n# identified as the original program.\n'''Players autoconfig'''\n\nDEFAULT_SETTINGS = {\n    'AUTOCONFIG_INDEX_VIEW': 'aimmo/home',\n    'STATIC_URL': '/static/',\n}\n\nSETTINGS = {\n    'INSTALLED_APPS': [\n        'django.contrib.auth',\n        'django.contrib.messages',\n        'django.contrib.staticfiles',\n        'django_js_reverse',\n    ],\n    'TEMPLATES': [\n        {\n            'BACKEND': 'django.template.backends.django.DjangoTemplates',\n            'APP_DIRS': True,\n            'OPTIONS': {\n                'context_processors': [\n                    'django.template.context_processors.debug',\n                    'django.template.context_processors.request',\n                    'django.contrib.auth.context_processors.auth',\n                    'django.contrib.messages.context_processors.messages',\n                ]\n            }\n        }\n    ],\n    'USE_TZ': True,\n}\n", "path": "players/autoconfig.py"}, {"content": "from django.conf.urls import url\nfrom django.views.generic import TemplateView\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.admin.views.decorators import staff_member_required\n\nfrom players import views\n\nurlpatterns = [\n    url(r'^$', staff_member_required(TemplateView.as_view(template_name='players/home.html')), name='aimmo/home'),\n\n    url(r'^program/$', staff_member_required(login_required(TemplateView.as_view(template_name='players/program.html'))), name='aimmo/program'),\n    url(r'^watch/$', staff_member_required(views.WatchView.as_view()), name='aimmo/watch'),\n    url(r'^statistics/$', staff_member_required(TemplateView.as_view(template_name='players/statistics.html')), name='aimmo/statistics'),\n\n    url(r'^api/code/$', staff_member_required(views.code), name='aimmo/code'),\n    url(r'^api/games/$', views.games, name='aimmo/games'),\n\n    url(r'^jsreverse/$', 'django_js_reverse.views.urls_js', name='aimmo/js_reverse'),  # TODO: Pull request to make django_js_reverse.urls\n]\n", "path": "players/urls.py"}]}