|
1 | 1 | """Project URLs for authenticated users."""
|
2 | 2 |
|
| 3 | +from django.conf import settings |
3 | 4 | from django.conf.urls import url
|
4 | 5 | from django.contrib.auth.decorators import login_required
|
5 | 6 | from django.views.generic.base import RedirectView
|
|
39 | 40 | ProjectUsersCreateList,
|
40 | 41 | ProjectUsersDelete,
|
41 | 42 | ProjectVersionDeleteHTML,
|
| 43 | + ProjectVersionCreate, |
42 | 44 | ProjectVersionDetail,
|
43 | 45 | RegexAutomationRuleCreate,
|
44 | 46 | RegexAutomationRuleUpdate,
|
|
81 | 83 | name='project_version_delete_html',
|
82 | 84 | ),
|
83 | 85 | url(
|
84 |
| - r'^(?P<project_slug>[-\w]+)/version/(?P<version_slug>[^/]+)/$', |
| 86 | + r'^(?P<project_slug>[-\w]+)/version/(?P<version_slug>[^/]+)/edit/$', |
85 | 87 | ProjectVersionDetail.as_view(),
|
86 | 88 | name='project_version_detail',
|
87 | 89 | ),
|
|
145 | 147 | ),
|
146 | 148 | ]
|
147 | 149 |
|
| 150 | +# TODO move this up to the list above when it's not a conditional URL. |
| 151 | +# Currently, this is only used by the new theme, we don't allow for "create" in |
| 152 | +# our current templates. |
| 153 | +if settings.RTD_EXT_THEME_ENABLED: |
| 154 | + urlpatterns.append( |
| 155 | + url( |
| 156 | + r'^(?P<project_slug>[-\w]+)/version/create/$', |
| 157 | + ProjectVersionCreate.as_view(), |
| 158 | + name='project_version_create', |
| 159 | + ), |
| 160 | + ) |
| 161 | + |
148 | 162 | domain_urls = [
|
149 | 163 | url(
|
150 | 164 | r'^(?P<project_slug>[-\w]+)/domains/$',
|
|
0 commit comments