Merge "Update URLs to Django 1.8+ style"

This commit is contained in:
Jenkins 2016-04-11 18:10:50 +00:00 committed by Gerrit Code Review
commit dc8c01c929
79 changed files with 216 additions and 390 deletions

View File

@ -172,19 +172,18 @@ the ``mypanel`` directory and add the following as a new url pattern::
The complete ``urls.py`` file should look like this::
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.mydashboard.mypanel import views
urlpatterns = patterns('',
urlpatterns = [,
url(r'^$',
views.IndexView.as_view(), name='index'),
url(r'^(?P<instance_id>[^/]+)/create_snapshot/$',
views.CreateSnapshotView.as_view(),
name='create_snapshot'),
)
]

View File

@ -28,9 +28,9 @@ urls, views, workflows and templates:
RESOURCE_CLASS = r'^(?P<resource_class_id>[^/]+)/%s$'
urlpatterns = patterns(
'',
url(RESOURCE_CLASS % 'update', UpdateView.as_view(), name='update'))
urlpatterns = [
url(RESOURCE_CLASS % 'update', UpdateView.as_view(), name='update')
]
#. In ``views.py``, we pass data to the template and to the action(form)
(action can also pass data to the ``get_context_data`` method and to the

View File

@ -28,7 +28,6 @@ import os
from django.conf import settings
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.core.exceptions import ImproperlyConfigured # noqa
from django.core.urlresolvers import reverse
@ -113,7 +112,7 @@ class HorizonComponent(object):
urls_mod = import_module('.urls', package_string)
urlpatterns = urls_mod.urlpatterns
else:
urlpatterns = patterns('')
urlpatterns = []
return urlpatterns
# FIXME(lhcheng): Removed the access_cached decorator for now until
@ -529,16 +528,13 @@ class Dashboard(Registry, HorizonComponent):
default_panel = panel
continue
url_slug = panel.slug.replace('.', '/')
urlpatterns += patterns('',
url(r'^%s/' % url_slug,
include(panel._decorated_urls)))
urlpatterns.append(url(r'^%s/' % url_slug,
include(panel._decorated_urls)))
# Now the default view, which should come last
if not default_panel:
raise NotRegistered('The default panel "%s" is not registered.'
% self.default_panel)
urlpatterns += patterns('',
url(r'',
include(default_panel._decorated_urls)))
urlpatterns.append(url(r'', include(default_panel._decorated_urls)))
# Require login if not public.
if not self.public:
@ -855,9 +851,8 @@ class Site(Registry, HorizonComponent):
# Compile the dynamic urlconf.
for dash in self._registry.values():
urlpatterns += patterns('',
url(r'^%s/' % dash.slug,
include(dash._decorated_urls)))
urlpatterns.append(url(r'^%s/' % dash.slug,
include(dash._decorated_urls)))
# Return the three arguments to django.conf.urls.include
return urlpatterns, self.namespace, self.slug

View File

@ -18,34 +18,33 @@
from django.conf import settings
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.views.generic import TemplateView # noqa
from django.views import i18n
from horizon.test.jasmine import jasmine
from horizon import views
urlpatterns = patterns(
'horizon.views',
url(r'^home/$', 'user_home', name='user_home')
)
urlpatterns = [
url(r'^home/$', views.user_home, name='user_home')
]
# Client-side i18n URLconf.
urlpatterns += patterns(
'',
urlpatterns.extend([
url(r'^i18n/js/(?P<packages>\S+?)/$',
'django.views.i18n.javascript_catalog',
i18n.javascript_catalog,
name='jsi18n'),
url(r'^i18n/setlang/$',
'django.views.i18n.set_language',
i18n.set_language,
name="set_language"),
url(r'^i18n/', include('django.conf.urls.i18n'))
)
])
if settings.DEBUG:
urlpatterns += patterns(
'',
urlpatterns.extend([
url(r'^jasmine-legacy/$',
TemplateView.as_view(
template_name="horizon/jasmine/jasmine_legacy.html"),
name='jasmine_tests'),
url(r'^jasmine/.*?$', jasmine.dispatcher))
url(r'^jasmine/.*?$', jasmine.dispatcher),
])

View File

@ -10,12 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from horizon.test.test_dashboards.cats.kittens.views import IndexView # noqa
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'),
)
]

View File

@ -10,12 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from horizon.test.test_dashboards.cats.tigers.views import IndexView # noqa
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'),
)
]

View File

@ -10,14 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from horizon.test.test_dashboards.dogs.puppies.views import IndexView # noqa
from horizon.test.test_dashboards.dogs.puppies.views import TwoTabsView # noqa
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'),
url(r'^tabs/$', TwoTabsView.as_view(), name='tabs'),
)
]

View File

@ -21,7 +21,6 @@ URL patterns for testing Horizon views.
"""
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa
from django.views.generic import TemplateView # noqa
@ -30,8 +29,7 @@ import horizon
from horizon.test.jasmine import jasmine
urlpatterns = patterns(
'',
urlpatterns = [
url(r'', include(horizon.urls)),
url(r"auth/login/", "django.contrib.auth.views.login",
{'template_name': "auth/login.html"},
@ -42,6 +40,6 @@ urlpatterns = patterns(
TemplateView.as_view(
template_name="horizon/jasmine/jasmine_legacy.html"),
name='jasmine_tests'),
)
]
urlpatterns += staticfiles_urlpatterns()

View File

@ -28,6 +28,5 @@ def register(view):
Django URL regex pattern.
'''
p = urls.url(view.url_regex, view.as_view())
p.add_prefix('openstack_dashboard.rest_api')
urlpatterns.append(p)
return view

View File

@ -12,13 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.contrib.developer.theme_preview import views
urlpatterns = patterns(
'openstack_dashboard.contrib.developer.theme_preview.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
)
]

View File

@ -10,15 +10,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.aggregates \
import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.aggregates.views',
urlpatterns = [
url(r'^$',
views.IndexView.as_view(), name='index'),
url(r'^create/$',
@ -27,4 +25,4 @@ urlpatterns = patterns(
views.UpdateView.as_view(), name='update'),
url(r'^(?P<id>[^/]+)/manage_hosts/$',
views.ManageHostsView.as_view(), name='manage_hosts'),
)
]

View File

@ -12,14 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.defaults import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.defaults.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^update_defaults$',
views.UpdateDefaultQuotasView.as_view(), name='update_defaults'))
views.UpdateDefaultQuotasView.as_view(), name='update_defaults'),
]

View File

@ -16,15 +16,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.flavors import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.flavors.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<id>[^/]+)/update/$', views.UpdateView.as_view(), name='update'),
)
]

View File

@ -10,14 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.hypervisors.compute import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.hypervisors.compute.views',
urlpatterns = [
url(r'^(?P<compute_host>[^/]+)/evacuate_host$',
views.EvacuateHostView.as_view(),
name='evacuate_host'),
@ -27,4 +25,4 @@ urlpatterns = patterns(
url(r'^(?P<compute_host>[^/]+)/migrate_host$',
views.MigrateHostView.as_view(),
name='migrate_host'),
)
]

View File

@ -13,7 +13,6 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.hypervisors.compute \
@ -21,11 +20,10 @@ from openstack_dashboard.dashboards.admin.hypervisors.compute \
from openstack_dashboard.dashboards.admin.hypervisors import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.hypervisors.views',
urlpatterns = [
url(r'^(?P<hypervisor>[^/]+)/$',
views.AdminDetailView.as_view(),
name='detail'),
url(r'^$', views.AdminIndexView.as_view(), name='index'),
url(r'', include(compute_urls, namespace='compute')),
)
]

View File

@ -16,18 +16,16 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.images import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.images.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<image_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'),
url(r'^(?P<image_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail')
)
]

View File

@ -16,12 +16,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.info import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.info.views',
url(r'^$', views.IndexView.as_view(), name='index'))
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
]

View File

@ -16,7 +16,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.instances import views
@ -25,15 +24,14 @@ from openstack_dashboard.dashboards.admin.instances import views
INSTANCES = r'^(?P<instance_id>[^/]+)/%s$'
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.instances.views',
urlpatterns = [
url(r'^$', views.AdminIndexView.as_view(), name='index'),
url(INSTANCES % 'update', views.AdminUpdateView.as_view(), name='update'),
url(INSTANCES % 'detail', views.DetailView.as_view(), name='detail'),
url(INSTANCES % 'console', 'console', name='console'),
url(INSTANCES % 'vnc', 'vnc', name='vnc'),
url(INSTANCES % 'spice', 'spice', name='spice'),
url(INSTANCES % 'rdp', 'rdp', name='rdp'),
url(INSTANCES % 'console', views.console, name='console'),
url(INSTANCES % 'vnc', views.vnc, name='vnc'),
url(INSTANCES % 'spice', views.spice, name='spice'),
url(INSTANCES % 'rdp', views.rdp, name='rdp'),
url(INSTANCES % 'live_migrate', views.LiveMigrateView.as_view(),
name='live_migrate'),
)
]

View File

@ -12,7 +12,6 @@
# 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 openstack_dashboard.dashboards.admin.metadata_defs import views
@ -21,11 +20,10 @@ from openstack_dashboard.dashboards.admin.metadata_defs import views
NAMESPACES = r'^(?P<namespace_id>[^/]+)/%s$'
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.metadata_defs.views',
urlpatterns = [
url(r'^$', views.AdminIndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(NAMESPACES % 'detail', views.DetailView.as_view(), name='detail'),
url(r'^(?P<id>[^/]+)/resource_types/$',
views.ManageResourceTypes.as_view(), name='resource_types'),
)
]

View File

@ -10,14 +10,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.metering import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.metering.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateUsageReport.as_view(), name='create'),
url(r'^samples$', views.SamplesView.as_view(), name='samples'),
url(r'^report/csv$', views.CsvReportView.as_view(), name='csvreport'))
url(r'^report/csv$', views.CsvReportView.as_view(), name='csvreport'),
]

View File

@ -12,16 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.networks.ports import views
PORTS = r'^(?P<port_id>[^/]+)/%s$'
VIEW_MOD = 'openstack_dashboard.dashboards.admin.networks.ports.views'
urlpatterns = patterns(
VIEW_MOD,
urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail')
)
]

View File

@ -12,17 +12,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.networks.subnets import views
SUBNETS = r'^(?P<subnet_id>[^/]+)/%s$'
VIEW_MOD = 'openstack_dashboard.dashboards.admin.networks.subnets.views'
urlpatterns = patterns(
VIEW_MOD,
url(SUBNETS % 'detail', views.DetailView.as_view(), name='detail')
)
urlpatterns = [
url(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'),
]

View File

@ -13,7 +13,6 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.networks.agents \
@ -32,12 +31,10 @@ from openstack_dashboard.dashboards.admin.networks import views
NETWORKS = r'^(?P<network_id>[^/]+)/%s$'
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(NETWORKS % 'update', views.UpdateView.as_view(), name='update'),
# for detail view
url(NETWORKS % 'detail', views.DetailView.as_view(), name='detail'),
url(NETWORKS % 'agents/add',
agent_views.AddView.as_view(), name='adddhcpagent'),
@ -51,4 +48,5 @@ urlpatterns = patterns(
port_views.UpdateView.as_view(), name='editport'),
url(r'^subnets/', include(subnet_urls, namespace='subnets')),
url(r'^ports/', include(port_urls, namespace='ports')))
url(r'^ports/', include(port_urls, namespace='ports')),
]

View File

@ -13,13 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.ngflavors import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.admin.ngflavors.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
)
]

View File

@ -17,13 +17,11 @@
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.overview import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.GlobalOverview.as_view(), name='index'),
)
]

View File

@ -12,13 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.routers.ports import views
PORTS = r'^(?P<port_id>[^/]+)/%s$'
urlpatterns = patterns(
'horizon.dashboards.admin.networks.ports.views',
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'))
urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
]

View File

@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.routers import views
@ -21,8 +20,7 @@ from openstack_dashboard.dashboards.admin.routers import views
ROUTER_URL = r'^(?P<router_id>[^/]+)/%s'
urlpatterns = patterns(
'horizon.dashboards.admin.routers.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(ROUTER_URL % '$',
views.DetailView.as_view(),
@ -30,4 +28,4 @@ urlpatterns = patterns(
url(ROUTER_URL % 'update',
views.UpdateView.as_view(),
name='update'),
)
]

View File

@ -10,18 +10,16 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.volumes.snapshots import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^(?P<snapshot_id>[^/]+)$',
views.DetailView.as_view(),
name='detail'),
url(r'^(?P<snapshot_id>[^/]+)/update_status/$',
views.UpdateStatusView.as_view(),
name='update_status'),
)
]

View File

@ -11,7 +11,6 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.volumes.snapshots \
@ -22,8 +21,7 @@ from openstack_dashboard.dashboards.admin.volumes.volume_types \
from openstack_dashboard.dashboards.admin.volumes.volumes \
import urls as volumes_urls
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$',
views.IndexView.as_view(),
name='index'),
@ -42,4 +40,4 @@ urlpatterns = patterns(
include(volume_types_urls, namespace='volume_types')),
url(r'snapshots/',
include(snapshot_urls, namespace='snapshots')),
)
]

View File

@ -10,15 +10,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.volumes.volume_types.extras \
import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<key>[^/]+)/edit/$', views.EditView.as_view(), name='edit')
)
url(r'^(?P<key>[^/]+)/edit/$', views.EditView.as_view(), name='edit'),
]

View File

@ -10,17 +10,15 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.volumes.volume_types.qos_specs \
import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^(?P<qos_spec_id>[^/]+)/create/$',
views.CreateKeyValuePairView.as_view(), name='create'),
url(r'^(?P<qos_spec_id>[^/]+)/$', views.IndexView.as_view(), name='index'),
url(r'^(?P<qos_spec_id>[^/]+)/key/(?P<key>[^/]+)/edit/$',
views.EditKeyValuePairView.as_view(), name='edit')
)
views.EditKeyValuePairView.as_view(), name='edit'),
]

View File

@ -11,7 +11,6 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.volumes.volume_types.extras \
@ -21,10 +20,8 @@ from openstack_dashboard.dashboards.admin.volumes.volume_types.qos_specs \
from openstack_dashboard.dashboards.admin.volumes.volume_types \
import views
VIEWS_MOD = ('openstack_dashboard.dashboards.admin.volumes.volume_types.views')
urlpatterns = patterns(
'VIEWS_MOD',
urlpatterns = [
url(r'^create_type$', views.CreateVolumeTypeView.as_view(),
name='create_type'),
url(r'^(?P<type_id>[^/]+)/update_type/$',
@ -51,4 +48,4 @@ urlpatterns = patterns(
name='type_encryption_detail'),
url(r'^qos_specs/',
include(qos_specs_urls, namespace='qos_specs')),
)
]

View File

@ -10,16 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.volumes.volumes \
import views
VIEWS_MOD = ('openstack_dashboard.dashboards.admin.volumes.volumes.views')
urlpatterns = patterns(
VIEWS_MOD,
urlpatterns = [
url(r'^manage/$',
views.ManageVolumeView.as_view(),
name='manage'),
@ -35,4 +31,4 @@ urlpatterns = patterns(
url(r'^(?P<volume_id>[^/]+)/migrate$',
views.MigrateVolumeView.as_view(),
name='migrate'),
)
]

View File

@ -12,16 +12,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.identity.domains import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateDomainView.as_view(), name='create'),
url(r'^(?P<domain_id>[^/]+)/update/$',
views.UpdateDomainView.as_view(), name='update')
)
]

View File

@ -12,14 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.identity.groups import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateView.as_view(), name='create'),
url(r'^(?P<group_id>[^/]+)/update/$',
@ -28,4 +26,4 @@ urlpatterns = patterns(
views.ManageMembersView.as_view(), name='manage_members'),
url(r'^(?P<group_id>[^/]+)/add_members/$',
views.NonMembersView.as_view(), name='add_members'),
)
]

View File

@ -12,8 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.identity.identity_providers.protocols \
@ -21,7 +19,6 @@ from openstack_dashboard.dashboards.identity.identity_providers.protocols \
PORTS = r'^(?P<protocol_id>[^/]+)/%s$'
urlpatterns = patterns(
'horizon.dashboards.identity.identity_providers.protocols.views',
urlpatterns = [
url(r'^create/$', views.AddProtocolView.as_view(), name='create'),
)
]

View File

@ -13,7 +13,6 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.identity.identity_providers.protocols \
@ -21,9 +20,7 @@ from openstack_dashboard.dashboards.identity.identity_providers.protocols \
from openstack_dashboard.dashboards.identity.identity_providers \
import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.identity.identity_providers.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<identity_provider_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail'),
@ -36,4 +33,4 @@ urlpatterns = patterns(
url(r'^register/$', views.RegisterView.as_view(), name='register'),
url(r'(?P<identity_provider_id>[^/]+)/protocols/',
include(protocol_urls, namespace='protocols')),
)
]

View File

@ -12,14 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.identity.mappings import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.identity.mappings.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<mapping_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'),
url(r'^create/$', views.CreateView.as_view(), name='create'))
url(r'^create/$', views.CreateView.as_view(), name='create'),
]

View File

@ -12,13 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.identity.ngusers import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.identity.ngusers.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
)
]

View File

@ -16,14 +16,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.identity.projects import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateProjectView.as_view(), name='create'),
url(r'^(?P<tenant_id>[^/]+)/update/$',
@ -32,4 +30,4 @@ urlpatterns = patterns(
views.ProjectUsageView.as_view(), name='usage'),
url(r'^(?P<project_id>[^/]+)/detail/$',
views.DetailProjectView.as_view(), name='detail'),
)
]

View File

@ -12,14 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.identity.roles import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.identity.roles.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<role_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'),
url(r'^create/$', views.CreateView.as_view(), name='create'))
url(r'^create/$', views.CreateView.as_view(), name='create'),
]

View File

@ -16,17 +16,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.identity.users import views
VIEWS_MOD = 'openstack_dashboard.dashboards.identity.users.views'
urlpatterns = patterns(
VIEWS_MOD,
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<user_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'),
@ -34,4 +29,5 @@ urlpatterns = patterns(
url(r'^(?P<user_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail'),
url(r'^(?P<user_id>[^/]+)/change_password/$',
views.ChangePasswordView.as_view(), name='change_password'))
views.ChangePasswordView.as_view(), name='change_password'),
]

View File

@ -16,15 +16,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.access_and_security.\
api_access import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^ec2/$', views.download_ec2_bundle, name='ec2'),
url(r'^openrc/$', views.download_rc_file, name='openrc'),
url(r'^openrcv2/$', views.download_rc_file_v2, name='openrcv2'),
@ -32,4 +30,4 @@ urlpatterns = patterns(
name='view_credentials'),
url(r'^recreate_ec2_credentials/$',
views.RecreateCredentialsView.as_view(), name='recreate_credentials'),
)
]

View File

@ -16,15 +16,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.access_and_security.\
floating_ips import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^associate/$', views.AssociateView.as_view(), name='associate'),
url(r'^allocate/$', views.AllocateView.as_view(), name='allocate')
)
url(r'^allocate/$', views.AllocateView.as_view(), name='allocate'),
]

View File

@ -16,15 +16,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.access_and_security.keypairs \
import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^import/$', views.ImportView.as_view(), name='import'),
url(r'^(?P<keypair_name>[^/]+)/download/$', views.DownloadView.as_view(),
@ -35,4 +33,4 @@ urlpatterns = patterns(
views.GenerateView.as_view(), name='generate'),
url(r'^(?P<keypair_name>[^/]+)/$', views.DetailView.as_view(),
name='detail'),
)
]

View File

@ -16,15 +16,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.access_and_security.\
security_groups import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<security_group_id>[^/]+)/$',
views.DetailView.as_view(),
@ -35,4 +33,4 @@ urlpatterns = patterns(
url(r'^(?P<security_group_id>[^/]+)/update/$',
views.UpdateView.as_view(),
name='update')
)
]

View File

@ -17,7 +17,6 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.access_and_security.\
@ -31,12 +30,11 @@ from openstack_dashboard.dashboards.project.access_and_security.\
from openstack_dashboard.dashboards.project.access_and_security import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'api_access/', include(api_access_urls, namespace='api_access')),
url(r'keypairs/', include(keypair_urls, namespace='keypairs')),
url(r'floating_ips/', include(fip_urls, namespace='floating_ips')),
url(r'security_groups/',
include(sec_group_urls, namespace='security_groups')),
)
]

View File

@ -17,14 +17,10 @@
# under the License.
from django.conf import settings
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.containers import views
VIEW_MOD = 'openstack_dashboard.dashboards.project.containers.views'
if settings.HORIZON_CONFIG['swift_panel'] == 'angular':
# New angular containers and objects
urlpatterns = [
@ -36,8 +32,7 @@ if settings.HORIZON_CONFIG['swift_panel'] == 'angular':
]
else:
# Legacy swift containers and objects
urlpatterns = patterns(
VIEW_MOD,
urlpatterns = [
url(r'^((?P<container_name>.+?)/)?(?P<subfolder_path>(.+/)+)?$',
views.ContainerView.as_view(), name='index'),
@ -75,6 +70,6 @@ else:
name='object_copy'),
url(r'^(?P<container_name>[^/]+)/(?P<object_path>.+)/download$',
'object_download',
views.object_download,
name='object_download'),
)
]

View File

@ -12,13 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.firewalls import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.project.firewalls.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^\?tab=fwtabs__firewalls$',
views.IndexView.as_view(), name='firewalls'),
@ -49,4 +47,5 @@ urlpatterns = patterns(
url(r'^removerouter/(?P<firewall_id>[^/]+)/$',
views.RemoveRouterFromFirewallView.as_view(), name='removerouter'),
url(r'^firewall/(?P<firewall_id>[^/]+)/$',
views.FirewallDetailsView.as_view(), name='firewalldetails'))
views.FirewallDetailsView.as_view(), name='firewalldetails'),
]

View File

@ -16,19 +16,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.images.images import views
VIEWS_MOD = 'openstack_dashboard.dashboards.project.images.images.views'
urlpatterns = patterns(
VIEWS_MOD,
urlpatterns = [
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<image_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'),
url(r'^(?P<image_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
)
]

View File

@ -16,15 +16,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.images.snapshots import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^(?P<instance_id>[^/]+)/create/$',
views.CreateView.as_view(),
name='create')
)
]

View File

@ -17,7 +17,6 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.images.images \
@ -27,9 +26,8 @@ from openstack_dashboard.dashboards.project.images.snapshots \
from openstack_dashboard.dashboards.project.images import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'', include(image_urls, namespace='images')),
url(r'', include(snapshot_urls, namespace='snapshots')),
)
]

View File

@ -16,7 +16,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.instances import views
@ -24,11 +23,8 @@ from openstack_dashboard.dashboards.project.instances import views
INSTANCES = r'^(?P<instance_id>[^/]+)/%s$'
INSTANCES_KEYPAIR = r'^(?P<instance_id>[^/]+)/(?P<keypair_name>[^/]+)/%s$'
VIEW_MOD = 'openstack_dashboard.dashboards.project.instances.views'
urlpatterns = patterns(
VIEW_MOD,
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^launch$', views.LaunchInstanceView.as_view(), name='launch'),
url(r'^(?P<instance_id>[^/]+)/$',
@ -37,10 +33,10 @@ urlpatterns = patterns(
url(INSTANCES % 'rebuild', views.RebuildView.as_view(), name='rebuild'),
url(INSTANCES % 'serial', views.SerialConsoleView.as_view(),
name='serial'),
url(INSTANCES % 'console', 'console', name='console'),
url(INSTANCES % 'vnc', 'vnc', name='vnc'),
url(INSTANCES % 'spice', 'spice', name='spice'),
url(INSTANCES % 'rdp', 'rdp', name='rdp'),
url(INSTANCES % 'console', views.console, name='console'),
url(INSTANCES % 'vnc', views.vnc, name='vnc'),
url(INSTANCES % 'spice', views.spice, name='spice'),
url(INSTANCES % 'rdp', views.rdp, name='rdp'),
url(INSTANCES % 'resize', views.ResizeView.as_view(), name='resize'),
url(INSTANCES_KEYPAIR % 'decryptpassword',
views.DecryptPasswordView.as_view(), name='decryptpassword'),
@ -48,4 +44,4 @@ urlpatterns = patterns(
views.AttachInterfaceView.as_view(), name='attach_interface'),
url(INSTANCES % 'detach_interface',
views.DetachInterfaceView.as_view(), name='detach_interface'),
)
]

View File

@ -12,14 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.loadbalancers import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.project.loadbalancers.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^\?tab=lbtabs__members$', views.IndexView.as_view(), name='members'),
url(r'^\?tab=lbtabs__monitors$',
@ -48,4 +46,5 @@ urlpatterns = patterns(
url(r'^member/(?P<member_id>[^/]+)/$',
views.MemberDetailsView.as_view(), name='memberdetails'),
url(r'^monitor/(?P<monitor_id>[^/]+)/$',
views.MonitorDetailsView.as_view(), name='monitordetails'))
views.MonitorDetailsView.as_view(), name='monitordetails'),
]

View File

@ -16,15 +16,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.network_topology import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.project.network_topology.views',
urlpatterns = [
url(r'^$', views.NetworkTopologyView.as_view(), name='index'),
url(r'^router$', views.RouterView.as_view(), name='router'),
url(r'^network$', views.NetworkView.as_view(), name='network'),
@ -44,4 +41,4 @@ urlpatterns = patterns(
name='createnetwork'),
url(r'^createrouter$', views.NTCreateRouterView.as_view(),
name='createrouter'),
)
]

View File

@ -12,17 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.networks.ports import views
PORTS = r'^(?P<port_id>[^/]+)/%s$'
VIEW_MOD = 'openstack_dashboard.dashboards.project.networks.ports.views'
urlpatterns = patterns(
VIEW_MOD,
url(PORTS % 'detail', views.DetailView.as_view(), name='detail')
)
urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
]

View File

@ -12,17 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.networks.subnets import views
SUBNETS = r'^(?P<subnet_id>[^/]+)/%s$'
VIEW_MOD = 'openstack_dashboard.dashboards.project.networks.subnets.views'
urlpatterns = patterns(
VIEW_MOD,
url(SUBNETS % 'detail', views.DetailView.as_view(), name='detail')
)
urlpatterns = [
url(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'),
]

View File

@ -13,7 +13,6 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.networks.ports \
@ -30,8 +29,7 @@ from openstack_dashboard.dashboards.project.networks import views
NETWORKS = r'^(?P<network_id>[^/]+)/%s$'
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateView.as_view(), name='create'),
url(NETWORKS % 'detail', views.DetailView.as_view(), name='detail'),
@ -43,4 +41,5 @@ urlpatterns = patterns(
url(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$',
port_views.UpdateView.as_view(), name='editport'),
url(r'^subnets/', include(subnet_urls, namespace='subnets')),
url(r'^ports/', include(port_urls, namespace='ports')))
url(r'^ports/', include(port_urls, namespace='ports')),
]

View File

@ -12,13 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.ngimages import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.project.ngimages.views',
urlpatterns = [
url('', views.IndexView.as_view(), name='index'),
)
]

View File

@ -16,15 +16,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.overview import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.project.overview.views',
urlpatterns = [
url(r'^$', views.ProjectOverview.as_view(), name='index'),
url(r'^warning$', views.WarningView.as_view(), name='warning'),
)
]

View File

@ -12,13 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.routers.ports import views
PORTS = r'^(?P<port_id>[^/]+)/%s$'
urlpatterns = patterns(
'horizon.dashboards.project.networks.ports.views',
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'))
urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
]

View File

@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.routers.extensions.extraroutes\
@ -27,8 +26,7 @@ from openstack_dashboard.dashboards.project.routers import views
ROUTER_URL = r'^(?P<router_id>[^/]+)/%s'
urlpatterns = patterns(
'horizon.dashboards.project.routers.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(ROUTER_URL % '$',
@ -49,4 +47,4 @@ urlpatterns = patterns(
url(ROUTER_URL % 'setgateway',
port_views.SetGatewayView.as_view(),
name='setgateway'),
)
]

View File

@ -11,14 +11,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.stacks.resource_types import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.ResourceTypesView.as_view(), name='index'),
url(r'^(?P<resource_type>[^/]+)/$',
views.DetailView.as_view(), name='details'),
)
]

View File

@ -10,13 +10,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.stacks import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^select_template$',
views.SelectTemplateView.as_view(),
@ -37,4 +35,4 @@ urlpatterns = patterns(
views.ResourceView.as_view(), name='resource'),
url(r'^get_d3_data/(?P<stack_id>[^/]+)/$',
views.JSONView.as_view(), name='d3_data'),
)
]

View File

@ -10,22 +10,16 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.volumes.backups import views
VIEWS_MOD = ('openstack_dashboard.dashboards.project'
'.volumes.backups.views')
urlpatterns = patterns(
VIEWS_MOD,
urlpatterns = [
url(r'^(?P<backup_id>[^/]+)/$',
views.BackupDetailView.as_view(),
name='detail'),
url(r'^(?P<backup_id>[^/]+)/restore/$',
views.RestoreBackupView.as_view(),
name='restore'),
)
]

View File

@ -10,14 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.volumes.cgroups import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^create/$',
views.CreateView.as_view(),
name='create'),
@ -30,4 +28,4 @@ urlpatterns = patterns(
url(r'^(?P<cgroup_id>[^/]+)$',
views.DetailView.as_view(),
name='detail'),
)
]

View File

@ -10,18 +10,16 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.volumes.snapshots import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^(?P<snapshot_id>[^/]+)$',
views.DetailView.as_view(),
name='detail'),
url(r'^(?P<snapshot_id>[^/]+)/update/$',
views.UpdateView.as_view(),
name='update'),
)
]

View File

@ -13,7 +13,6 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.volumes.backups \
@ -26,8 +25,7 @@ from openstack_dashboard.dashboards.project.volumes import views
from openstack_dashboard.dashboards.project.volumes.volumes \
import urls as volume_urls
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^\?tab=volumes_and_snapshots__snapshots_tab$',
views.IndexView.as_view(), name='snapshots_tab'),
@ -41,4 +39,4 @@ urlpatterns = patterns(
url(r'backups/', include(backups_urls, namespace='backups')),
url(r'snapshots/', include(snapshot_urls, namespace='snapshots')),
url(r'cgroups/', include(cgroup_urls, namespace='cgroups')),
)
]

View File

@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.volumes \
@ -21,10 +20,7 @@ from openstack_dashboard.dashboards.project.volumes.backups \
import views as backup_views
VIEWS_MOD = ('openstack_dashboard.dashboards.project.volumes.volumes.views')
urlpatterns = patterns(
VIEWS_MOD,
urlpatterns = [
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<volume_id>[^/]+)/extend/$',
views.ExtendView.as_view(),
@ -62,4 +58,4 @@ urlpatterns = patterns(
url(r'^(?P<volume_id>[^/]+)/encryption_detail/$',
views.EncryptionDetailView.as_view(),
name='encryption_detail'),
)
]

View File

@ -12,13 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.vpn import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.project.vpn.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^addikepolicy$',
views.AddIKEPolicyView.as_view(), name='addikepolicy'),
@ -46,4 +44,5 @@ urlpatterns = patterns(
views.VPNServiceDetailsView.as_view(), name='vpnservicedetails'),
url(r'^ipsecsiteconnection/(?P<ipsecsiteconnection_id>[^/]+)/$',
views.IPSecSiteConnectionDetailsView.as_view(),
name='ipsecsiteconnectiondetails'))
name='ipsecsiteconnectiondetails'),
]

View File

@ -12,12 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.settings.password import views
urlpatterns = patterns(
'',
url(r'^$', views.PasswordView.as_view(), name='index'))
urlpatterns = [
url(r'^$', views.PasswordView.as_view(), name='index'),
]

View File

@ -12,12 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.settings.user import views
urlpatterns = patterns(
'',
url(r'^$', views.UserSettingsView.as_view(), name='index'))
urlpatterns = [
url(r'^$', views.UserSettingsView.as_view(), name='index'),
]

View File

@ -1,8 +1,6 @@
from django.conf.urls import patterns
from django.conf.urls import url
from django.views import defaults
from openstack_dashboard.urls import urlpatterns # noqa
urlpatterns += patterns(
'',
(r'^500/$', 'django.views.defaults.server_error')
)
urlpatterns.append(url(r'^500/$', defaults.server_error))

View File

@ -10,12 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.test.test_panels.another_panel import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
)
]

View File

@ -10,12 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.test.test_panels.nonloading_panel import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
)
]

View File

@ -10,12 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.test.test_panels.plugin_panel import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
)
]

View File

@ -10,12 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.test.test_panels.second_panel import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
)
]

View File

@ -19,23 +19,24 @@ URL patterns for the OpenStack Dashboard.
from django.conf import settings
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls.static import static # noqa
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa
from django.views import defaults
from openstack_dashboard.api import rest
from openstack_dashboard.test.jasmine import jasmine
from openstack_dashboard import views
import horizon
urlpatterns = patterns(
'',
url(r'^$', 'openstack_dashboard.views.splash', name='splash'),
urlpatterns = [
url(r'^$', views.splash, name='splash'),
url(r'^auth/', include('openstack_auth.urls')),
url(r'^api/', include('openstack_dashboard.api.rest.urls')),
url(r'^api/', include(rest.urls)),
url(r'^jasmine/(.*?)$', jasmine.dispatcher),
url(r'', include(horizon.urls)),
)
]
# Development static app and project media serving using the staticfiles app.
urlpatterns += staticfiles_urlpatterns()
@ -46,7 +47,4 @@ urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG:
urlpatterns += patterns(
'',
url(r'^500/$', 'django.views.defaults.server_error')
)
urlpatterns.append(url(r'^500/$', defaults.server_error))

View File

@ -22,25 +22,24 @@ URL patterns for the OpenStack Dashboard.
from django.conf import settings
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls.static import static # noqa
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa
from django.views import defaults
import horizon
urlpatterns = patterns(
'',
url(r'^$', 'openstack_dashboard.views.splash', name='splash'),
url(r'^api/', include('openstack_dashboard.api.rest.urls')),
from openstack_dashboard.api import rest
from openstack_dashboard import views
urlpatterns = [
url(r'^$', views.splash, name='splash'),
url(r'^api/', include(rest.urls)),
url(r'', include(horizon.urls)),
)
]
for u in getattr(settings, 'AUTHENTICATION_URLS', ['openstack_auth.urls']):
urlpatterns += patterns(
'',
url(r'^auth/', include(u))
)
urlpatterns.append(url(r'^auth/', include(u)))
# Development static app and project media serving using the staticfiles app.
urlpatterns += staticfiles_urlpatterns()
@ -51,7 +50,4 @@ urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG:
urlpatterns += patterns(
'',
url(r'^500/$', 'django.views.defaults.server_error')
)
urlpatterns.append(url(r'^500/$', defaults.server_error))