Merge "Update URLs to Django 1.8 style"

This commit is contained in:
Jenkins 2016-02-16 17:30:38 +00:00 committed by Gerrit Code Review
commit 22818f5a83
7 changed files with 15 additions and 30 deletions

View File

@ -12,18 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from mistraldashboard.actions import views
ACTIONS = r'^(?P<action_name>[^/]+)/%s$'
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(ACTIONS % 'detail', views.DetailView.as_view(), name='detail'),
url(ACTIONS % 'run', views.RunView.as_view(), name='run'),
url(r'^create$', views.CreateView.as_view(), name='create'),
url(r'^update$', views.UpdateView.as_view(), name='update'),
)
]

View File

@ -12,18 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from mistraldashboard.cron_triggers import views
CRON_TRIGGERS = r'^(?P<cron_trigger_name>[^/]+)/%s$'
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(CRON_TRIGGERS % 'detail', views.OverviewView.as_view(), name='detail'),
url(r'^create$',
views.CreateView.as_view(),
name='create'),
)
url(r'^create$', views.CreateView.as_view(), name='create'),
]

View File

@ -14,15 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from mistraldashboard.executions import views
EXECUTIONS = r'^(?P<execution_id>[^/]+)/%s$'
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(EXECUTIONS % 'detail', views.DetailView.as_view(), name='detail'),
url(EXECUTIONS % 'detail_task_id', views.DetailView.as_view(),
@ -34,4 +32,4 @@ urlpatterns = patterns(
url(EXECUTIONS % 'update_description',
views.UpdateDescriptionView.as_view(),
name='update_description'),
)
]

View File

@ -14,15 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from mistraldashboard.tasks import views
TASKS = r'^(?P<task_id>[^/]+)/%s$'
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(TASKS % 'detail', views.OverviewView.as_view(), name='detail'),
url(TASKS % 'execution', views.ExecutionView.as_view(), name='execution'),
@ -30,4 +28,4 @@ urlpatterns = patterns(
{'column': 'result'}, name='result'),
url(TASKS % 'published', views.CodeView.as_view(),
{'column': 'published'}, name='published'),
)
]

View File

@ -14,7 +14,6 @@
from django.conf import urls
import openstack_dashboard.urls
urlpatterns = urls.patterns(
'',
urlpatterns = [
urls.url(r'', urls.include(openstack_dashboard.urls))
)
]

View File

@ -14,15 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from mistraldashboard.workbooks import views
WORKBOOKS = r'^(?P<workbook_name>[^/]+)/%s$'
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^select_definition$',
views.SelectDefinitionView.as_view(),
@ -33,4 +31,4 @@ urlpatterns = patterns(
url(r'^create$', views.CreateView.as_view(), name='create'),
url(r'^update$', views.UpdateView.as_view(), name='update'),
url(WORKBOOKS % 'detail', views.DetailView.as_view(), name='detail'),
)
]

View File

@ -14,15 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from mistraldashboard.workflows import views
WORKFLOWS = r'^(?P<workflow_name>[^/]+)/%s$'
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^select_definition$',
views.SelectDefinitionView.as_view(),
@ -34,4 +32,4 @@ urlpatterns = patterns(
url(r'^update$', views.UpdateView.as_view(), name='update'),
url(WORKFLOWS % 'execute', views.ExecuteView.as_view(), name='execute'),
url(WORKFLOWS % 'detail', views.DetailView.as_view(), name='detail'),
)
]