The root route (url '/' => pattern '^') should now be correct.
All checks were successful
buildbot/tox Build done.

This commit is contained in:
2019-11-26 10:23:08 +01:00
parent b812de6c80
commit ca4e65e926
3 changed files with 3 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ def get_urlpatterns(file_path, urlpatterns):
if 'MOUNT' in config[app]:
route, urlconf_module = config[app]['MOUNT']
if route == '/':
pattern = '^$'
pattern = '^'
else:
pattern = '^{}'.format(route)
url_obj = url(pattern, include(urlconf_module))

View File

@@ -174,7 +174,7 @@ class DjangoProjectTestCase(DjangoDeployTestCase):
project.mount_app('django_deploy.tests.fake_app1', '')
expected_urlpatterns = [
('URLResolver', '^$', 'django_deploy.tests.fake_app1.urls'),
('URLResolver', '^', 'django_deploy.tests.fake_app1.urls'),
]
self.assert_urlpatterns(project_dir, expected_urlpatterns)

View File

@@ -148,7 +148,7 @@ class ProgramTestCase(DjangoDeployTestCase):
# Similar code from test_api.test_mount_apps
expected_urlpatterns = [
('URLResolver', '^$', 'django_deploy.tests.fake_app1.urls'),
('URLResolver', '^', 'django_deploy.tests.fake_app1.urls'),
('URLResolver', '^app2/', 'django_deploy.tests.fake_app2.urls'),
]