|
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
|
|
82 | 83 | ProjectVersionDeleteHTML.as_view(),
|
83 | 84 | name='project_version_delete_html',
|
84 | 85 | ),
|
85 |
| - url( |
86 |
| - r'^(?P<project_slug>[-\w]+)/version/create/$', |
87 |
| - ProjectVersionCreate.as_view(), |
88 |
| - name='project_version_create', |
89 |
| - ), |
90 | 86 | url(
|
91 | 87 | r'^(?P<project_slug>[-\w]+)/version/(?P<version_slug>[^/]+)/edit/$',
|
92 | 88 | ProjectVersionDetail.as_view(),
|
|
152 | 148 | ),
|
153 | 149 | ]
|
154 | 150 |
|
| 151 | +# TODO move this up to the list above when it's not a conditional URL. |
| 152 | +# Currently, this is only used by the new theme, we don't allow for "create" in |
| 153 | +# our current templates. |
| 154 | +if settings.RTD_EXT_THEME_ENABLED: |
| 155 | + urlpatterns.append( |
| 156 | + url( |
| 157 | + r'^(?P<project_slug>[-\w]+)/version/create/$', |
| 158 | + ProjectVersionCreate.as_view(), |
| 159 | + name='project_version_create', |
| 160 | + ), |
| 161 | + ) |
| 162 | + |
155 | 163 | domain_urls = [
|
156 | 164 | url(
|
157 | 165 | r'^(?P<project_slug>[-\w]+)/domains/$',
|
|
0 commit comments