Commit 3890b855 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

fix url conflicts

close #261
parent 7a793b87
......@@ -188,7 +188,8 @@ class Webapp(TimeStampModel):
docker_name_validator,
# 'root' and 'sshd' are reserved because webapp docker_names are mapped
# to system users inside the ssh container
RegexValidator(r"\A(root|sshd)\Z", inverse_match=True,
# '_.*' is reserved because of url conflicts
RegexValidator(r"\A(root\Z|sshd\Z|_)", inverse_match=True,
message="This is a reserved name"),
])
readme = models.IntegerField(blank=True, null=True)
......
......@@ -47,9 +47,9 @@ app_name = 'main'
urlpatterns = [
url(r'^$', views.IndexDetail.as_view(), name="home"),
url(r'^apps/$', views.WebappList.as_view(), name='webapp_list'),
url(r'^apps/authors/(?P<username>[\w.@+-]+)/$', views.UserWebappList.as_view(), name='user_webapp_list'),
url(r'^apps/_authors/(?P<username>[\w.@+-]+)/$', views.UserWebappList.as_view(), name='user_webapp_list'),
url(r'^apps/_create/$', views.WebappCreate.as_view(), name='webapp_creation'),
url(r'^apps/(?P<docker_name>[\w-]+)/update/$', views.WebappUpdate.as_view(), name="webapp_update"),
url(r'^apps/create/$', views.WebappCreate.as_view(), name='webapp_creation'),
url(r'^apps/(?P<docker_name>[\w-]+)/sandbox/$', views.WebappSandboxPanel.as_view(), name="webapp_sandbox_panel"),
url(r'^apps/(?P<docker_name>[\w-]+)/json$', views.WebappJson.as_view(), name='webapp_json'),
url(r'^app/(?P<docker_name>[\w-]+)/$', views.JobCreate.as_view(), name='webapp_detail'),
......@@ -71,7 +71,7 @@ urlpatterns = [
url(r'^profile/password$', views.UserPasswordUpdate.as_view(), name='user_password'),
# url(r'^runners/$', views.RunnerList.as_view(), name='runner_list'),
# url(r'^runners/add/$', views.RunnerCreate.as_view(), name='runner_create'),
# url(r'^runners/_add/$', views.RunnerCreate.as_view(), name='runner_create'),
# url(r'^runners/(?P<pk>\d+)/update/$', views.RunnerUpdate.as_view(), name='runner_update'),
# url(r'^runners/(?P<pk>\d+)/delete/$', views.RunnerDelete.as_view(), name='runner_delete'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment