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:: The complete ``urls.py`` file should look like this::
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.mydashboard.mypanel import views from openstack_dashboard.dashboards.mydashboard.mypanel import views
urlpatterns = patterns('', urlpatterns = [,
url(r'^$', url(r'^$',
views.IndexView.as_view(), name='index'), views.IndexView.as_view(), name='index'),
url(r'^(?P<instance_id>[^/]+)/create_snapshot/$', url(r'^(?P<instance_id>[^/]+)/create_snapshot/$',
views.CreateSnapshotView.as_view(), views.CreateSnapshotView.as_view(),
name='create_snapshot'), name='create_snapshot'),
) ]

View File

@ -28,9 +28,9 @@ urls, views, workflows and templates:
RESOURCE_CLASS = r'^(?P<resource_class_id>[^/]+)/%s$' RESOURCE_CLASS = r'^(?P<resource_class_id>[^/]+)/%s$'
urlpatterns = patterns( urlpatterns = [
'', url(RESOURCE_CLASS % 'update', UpdateView.as_view(), name='update')
url(RESOURCE_CLASS % 'update', UpdateView.as_view(), name='update')) ]
#. In ``views.py``, we pass data to the template and to the action(form) #. 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 (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 import settings
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from django.core.exceptions import ImproperlyConfigured # noqa from django.core.exceptions import ImproperlyConfigured # noqa
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
@ -113,7 +112,7 @@ class HorizonComponent(object):
urls_mod = import_module('.urls', package_string) urls_mod = import_module('.urls', package_string)
urlpatterns = urls_mod.urlpatterns urlpatterns = urls_mod.urlpatterns
else: else:
urlpatterns = patterns('') urlpatterns = []
return urlpatterns return urlpatterns
# FIXME(lhcheng): Removed the access_cached decorator for now until # FIXME(lhcheng): Removed the access_cached decorator for now until
@ -529,16 +528,13 @@ class Dashboard(Registry, HorizonComponent):
default_panel = panel default_panel = panel
continue continue
url_slug = panel.slug.replace('.', '/') url_slug = panel.slug.replace('.', '/')
urlpatterns += patterns('', urlpatterns.append(url(r'^%s/' % url_slug,
url(r'^%s/' % url_slug,
include(panel._decorated_urls))) include(panel._decorated_urls)))
# Now the default view, which should come last # Now the default view, which should come last
if not default_panel: if not default_panel:
raise NotRegistered('The default panel "%s" is not registered.' raise NotRegistered('The default panel "%s" is not registered.'
% self.default_panel) % self.default_panel)
urlpatterns += patterns('', urlpatterns.append(url(r'', include(default_panel._decorated_urls)))
url(r'',
include(default_panel._decorated_urls)))
# Require login if not public. # Require login if not public.
if not self.public: if not self.public:
@ -855,8 +851,7 @@ class Site(Registry, HorizonComponent):
# Compile the dynamic urlconf. # Compile the dynamic urlconf.
for dash in self._registry.values(): for dash in self._registry.values():
urlpatterns += patterns('', urlpatterns.append(url(r'^%s/' % dash.slug,
url(r'^%s/' % dash.slug,
include(dash._decorated_urls))) include(dash._decorated_urls)))
# Return the three arguments to django.conf.urls.include # Return the three arguments to django.conf.urls.include

View File

@ -18,34 +18,33 @@
from django.conf import settings from django.conf import settings
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from django.views.generic import TemplateView # noqa from django.views.generic import TemplateView # noqa
from django.views import i18n
from horizon.test.jasmine import jasmine from horizon.test.jasmine import jasmine
from horizon import views
urlpatterns = patterns( urlpatterns = [
'horizon.views', url(r'^home/$', views.user_home, name='user_home')
url(r'^home/$', 'user_home', name='user_home') ]
)
# Client-side i18n URLconf. # Client-side i18n URLconf.
urlpatterns += patterns( urlpatterns.extend([
'',
url(r'^i18n/js/(?P<packages>\S+?)/$', url(r'^i18n/js/(?P<packages>\S+?)/$',
'django.views.i18n.javascript_catalog', i18n.javascript_catalog,
name='jsi18n'), name='jsi18n'),
url(r'^i18n/setlang/$', url(r'^i18n/setlang/$',
'django.views.i18n.set_language', i18n.set_language,
name="set_language"), name="set_language"),
url(r'^i18n/', include('django.conf.urls.i18n')) url(r'^i18n/', include('django.conf.urls.i18n'))
) ])
if settings.DEBUG: if settings.DEBUG:
urlpatterns += patterns( urlpatterns.extend([
'',
url(r'^jasmine-legacy/$', url(r'^jasmine-legacy/$',
TemplateView.as_view( TemplateView.as_view(
template_name="horizon/jasmine/jasmine_legacy.html"), template_name="horizon/jasmine/jasmine_legacy.html"),
name='jasmine_tests'), 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from horizon.test.test_dashboards.cats.kittens.views import IndexView # noqa from horizon.test.test_dashboards.cats.kittens.views import IndexView # noqa
urlpatterns = patterns( urlpatterns = [
'',
url(r'^$', IndexView.as_view(), name='index'), url(r'^$', IndexView.as_view(), name='index'),
) ]

View File

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

View File

@ -10,14 +10,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url 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 IndexView # noqa
from horizon.test.test_dashboards.dogs.puppies.views import TwoTabsView # noqa from horizon.test.test_dashboards.dogs.puppies.views import TwoTabsView # noqa
urlpatterns = patterns( urlpatterns = [
'',
url(r'^$', IndexView.as_view(), name='index'), url(r'^$', IndexView.as_view(), name='index'),
url(r'^tabs/$', TwoTabsView.as_view(), name='tabs'), 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 include
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa
from django.views.generic import TemplateView # noqa from django.views.generic import TemplateView # noqa
@ -30,8 +29,7 @@ import horizon
from horizon.test.jasmine import jasmine from horizon.test.jasmine import jasmine
urlpatterns = patterns( urlpatterns = [
'',
url(r'', include(horizon.urls)), url(r'', include(horizon.urls)),
url(r"auth/login/", "django.contrib.auth.views.login", url(r"auth/login/", "django.contrib.auth.views.login",
{'template_name': "auth/login.html"}, {'template_name': "auth/login.html"},
@ -42,6 +40,6 @@ urlpatterns = patterns(
TemplateView.as_view( TemplateView.as_view(
template_name="horizon/jasmine/jasmine_legacy.html"), template_name="horizon/jasmine/jasmine_legacy.html"),
name='jasmine_tests'), name='jasmine_tests'),
) ]
urlpatterns += staticfiles_urlpatterns() urlpatterns += staticfiles_urlpatterns()

View File

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

View File

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

View File

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

View File

@ -12,14 +12,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.admin.defaults import views from openstack_dashboard.dashboards.admin.defaults import views
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.admin.defaults.views',
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^update_defaults$', 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.admin.flavors import views from openstack_dashboard.dashboards.admin.flavors import views
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.admin.flavors.views',
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<id>[^/]+)/update/$', views.UpdateView.as_view(), name='update'), 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.admin.hypervisors.compute import views from openstack_dashboard.dashboards.admin.hypervisors.compute import views
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.admin.hypervisors.compute.views',
url(r'^(?P<compute_host>[^/]+)/evacuate_host$', url(r'^(?P<compute_host>[^/]+)/evacuate_host$',
views.EvacuateHostView.as_view(), views.EvacuateHostView.as_view(),
name='evacuate_host'), name='evacuate_host'),
@ -27,4 +25,4 @@ urlpatterns = patterns(
url(r'^(?P<compute_host>[^/]+)/migrate_host$', url(r'^(?P<compute_host>[^/]+)/migrate_host$',
views.MigrateHostView.as_view(), views.MigrateHostView.as_view(),
name='migrate_host'), name='migrate_host'),
) ]

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa from django.conf.urls import url # noqa
from openstack_dashboard.dashboards.admin.metadata_defs import views 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$' NAMESPACES = r'^(?P<namespace_id>[^/]+)/%s$'
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.admin.metadata_defs.views',
url(r'^$', views.AdminIndexView.as_view(), name='index'), url(r'^$', views.AdminIndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), url(r'^create/$', views.CreateView.as_view(), name='create'),
url(NAMESPACES % 'detail', views.DetailView.as_view(), name='detail'), url(NAMESPACES % 'detail', views.DetailView.as_view(), name='detail'),
url(r'^(?P<id>[^/]+)/resource_types/$', url(r'^(?P<id>[^/]+)/resource_types/$',
views.ManageResourceTypes.as_view(), name='resource_types'), views.ManageResourceTypes.as_view(), name='resource_types'),
) ]

View File

@ -10,14 +10,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.admin.metering import views from openstack_dashboard.dashboards.admin.metering import views
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.admin.metering.views',
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateUsageReport.as_view(), name='create'), url(r'^create/$', views.CreateUsageReport.as_view(), name='create'),
url(r'^samples$', views.SamplesView.as_view(), name='samples'), 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.admin.networks.ports import views from openstack_dashboard.dashboards.admin.networks.ports import views
PORTS = r'^(?P<port_id>[^/]+)/%s$' PORTS = r'^(?P<port_id>[^/]+)/%s$'
VIEW_MOD = 'openstack_dashboard.dashboards.admin.networks.ports.views'
urlpatterns = patterns( urlpatterns = [
VIEW_MOD,
url(PORTS % 'detail', views.DetailView.as_view(), name='detail') url(PORTS % 'detail', views.DetailView.as_view(), name='detail')
) ]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,15 +10,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.admin.volumes.volume_types.extras \ from openstack_dashboard.dashboards.admin.volumes.volume_types.extras \
import views import views
urlpatterns = patterns( urlpatterns = [
'',
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.admin.volumes.volume_types.qos_specs \ from openstack_dashboard.dashboards.admin.volumes.volume_types.qos_specs \
import views import views
urlpatterns = patterns( urlpatterns = [
'',
url(r'^(?P<qos_spec_id>[^/]+)/create/$', url(r'^(?P<qos_spec_id>[^/]+)/create/$',
views.CreateKeyValuePairView.as_view(), name='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>[^/]+)/$', views.IndexView.as_view(), name='index'),
url(r'^(?P<qos_spec_id>[^/]+)/key/(?P<key>[^/]+)/edit/$', 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. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.admin.volumes.volume_types.extras \ 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 \ from openstack_dashboard.dashboards.admin.volumes.volume_types \
import views import views
VIEWS_MOD = ('openstack_dashboard.dashboards.admin.volumes.volume_types.views')
urlpatterns = patterns( urlpatterns = [
'VIEWS_MOD',
url(r'^create_type$', views.CreateVolumeTypeView.as_view(), url(r'^create_type$', views.CreateVolumeTypeView.as_view(),
name='create_type'), name='create_type'),
url(r'^(?P<type_id>[^/]+)/update_type/$', url(r'^(?P<type_id>[^/]+)/update_type/$',
@ -51,4 +48,4 @@ urlpatterns = patterns(
name='type_encryption_detail'), name='type_encryption_detail'),
url(r'^qos_specs/', url(r'^qos_specs/',
include(qos_specs_urls, namespace='qos_specs')), include(qos_specs_urls, namespace='qos_specs')),
) ]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,14 +12,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.identity.roles import views from openstack_dashboard.dashboards.identity.roles import views
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.identity.roles.views',
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<role_id>[^/]+)/update/$', url(r'^(?P<role_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.identity.users import views from openstack_dashboard.dashboards.identity.users import views
VIEWS_MOD = 'openstack_dashboard.dashboards.identity.users.views' urlpatterns = [
urlpatterns = patterns(
VIEWS_MOD,
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<user_id>[^/]+)/update/$', url(r'^(?P<user_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
@ -34,4 +29,5 @@ urlpatterns = patterns(
url(r'^(?P<user_id>[^/]+)/detail/$', url(r'^(?P<user_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail'), views.DetailView.as_view(), name='detail'),
url(r'^(?P<user_id>[^/]+)/change_password/$', 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.project.access_and_security.\ from openstack_dashboard.dashboards.project.access_and_security.\
api_access import views api_access import views
urlpatterns = patterns( urlpatterns = [
'',
url(r'^ec2/$', views.download_ec2_bundle, name='ec2'), url(r'^ec2/$', views.download_ec2_bundle, name='ec2'),
url(r'^openrc/$', views.download_rc_file, name='openrc'), url(r'^openrc/$', views.download_rc_file, name='openrc'),
url(r'^openrcv2/$', views.download_rc_file_v2, name='openrcv2'), url(r'^openrcv2/$', views.download_rc_file_v2, name='openrcv2'),
@ -32,4 +30,4 @@ urlpatterns = patterns(
name='view_credentials'), name='view_credentials'),
url(r'^recreate_ec2_credentials/$', url(r'^recreate_ec2_credentials/$',
views.RecreateCredentialsView.as_view(), name='recreate_credentials'), views.RecreateCredentialsView.as_view(), name='recreate_credentials'),
) ]

View File

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

View File

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

View File

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

View File

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

View File

@ -12,13 +12,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.project.firewalls import views from openstack_dashboard.dashboards.project.firewalls import views
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.project.firewalls.views',
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^\?tab=fwtabs__firewalls$', url(r'^\?tab=fwtabs__firewalls$',
views.IndexView.as_view(), name='firewalls'), views.IndexView.as_view(), name='firewalls'),
@ -49,4 +47,5 @@ urlpatterns = patterns(
url(r'^removerouter/(?P<firewall_id>[^/]+)/$', url(r'^removerouter/(?P<firewall_id>[^/]+)/$',
views.RemoveRouterFromFirewallView.as_view(), name='removerouter'), views.RemoveRouterFromFirewallView.as_view(), name='removerouter'),
url(r'^firewall/(?P<firewall_id>[^/]+)/$', 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.project.images.images import views from openstack_dashboard.dashboards.project.images.images import views
VIEWS_MOD = 'openstack_dashboard.dashboards.project.images.images.views' urlpatterns = [
urlpatterns = patterns(
VIEWS_MOD,
url(r'^create/$', views.CreateView.as_view(), name='create'), url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<image_id>[^/]+)/update/$', url(r'^(?P<image_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
url(r'^(?P<image_id>[^/]+)/$', views.DetailView.as_view(), name='detail'), 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.project.images.snapshots import views from openstack_dashboard.dashboards.project.images.snapshots import views
urlpatterns = patterns( urlpatterns = [
'',
url(r'^(?P<instance_id>[^/]+)/create/$', url(r'^(?P<instance_id>[^/]+)/create/$',
views.CreateView.as_view(), views.CreateView.as_view(),
name='create') name='create')
) ]

View File

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

View File

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

View File

@ -12,14 +12,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.project.loadbalancers import views from openstack_dashboard.dashboards.project.loadbalancers import views
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.project.loadbalancers.views',
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^\?tab=lbtabs__members$', views.IndexView.as_view(), name='members'), url(r'^\?tab=lbtabs__members$', views.IndexView.as_view(), name='members'),
url(r'^\?tab=lbtabs__monitors$', url(r'^\?tab=lbtabs__monitors$',
@ -48,4 +46,5 @@ urlpatterns = patterns(
url(r'^member/(?P<member_id>[^/]+)/$', url(r'^member/(?P<member_id>[^/]+)/$',
views.MemberDetailsView.as_view(), name='memberdetails'), views.MemberDetailsView.as_view(), name='memberdetails'),
url(r'^monitor/(?P<monitor_id>[^/]+)/$', 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.project.network_topology import views from openstack_dashboard.dashboards.project.network_topology import views
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.project.network_topology.views',
url(r'^$', views.NetworkTopologyView.as_view(), name='index'), url(r'^$', views.NetworkTopologyView.as_view(), name='index'),
url(r'^router$', views.RouterView.as_view(), name='router'), url(r'^router$', views.RouterView.as_view(), name='router'),
url(r'^network$', views.NetworkView.as_view(), name='network'), url(r'^network$', views.NetworkView.as_view(), name='network'),
@ -44,4 +41,4 @@ urlpatterns = patterns(
name='createnetwork'), name='createnetwork'),
url(r'^createrouter$', views.NTCreateRouterView.as_view(), url(r'^createrouter$', views.NTCreateRouterView.as_view(),
name='createrouter'), name='createrouter'),
) ]

View File

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

View File

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

View File

@ -13,7 +13,6 @@
# under the License. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.project.networks.ports \ 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$' NETWORKS = r'^(?P<network_id>[^/]+)/%s$'
urlpatterns = patterns( urlpatterns = [
'',
url(r'^$', views.IndexView.as_view(), name='index'), url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateView.as_view(), name='create'), url(r'^create$', views.CreateView.as_view(), name='create'),
url(NETWORKS % 'detail', views.DetailView.as_view(), name='detail'), 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$', url(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$',
port_views.UpdateView.as_view(), name='editport'), port_views.UpdateView.as_view(), name='editport'),
url(r'^subnets/', include(subnet_urls, namespace='subnets')), 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.project.ngimages import views from openstack_dashboard.dashboards.project.ngimages import views
urlpatterns = patterns( urlpatterns = [
'openstack_dashboard.dashboards.project.ngimages.views',
url('', views.IndexView.as_view(), name='index'), url('', views.IndexView.as_view(), name='index'),
) ]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,12 +12,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.dashboards.settings.user import views from openstack_dashboard.dashboards.settings.user import views
urlpatterns = patterns( urlpatterns = [
'', url(r'^$', views.UserSettingsView.as_view(), name='index'),
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 from openstack_dashboard.urls import urlpatterns # noqa
urlpatterns += patterns( urlpatterns.append(url(r'^500/$', defaults.server_error))
'',
(r'^500/$', 'django.views.defaults.server_error')
)

View File

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

View File

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

View File

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

View File

@ -10,12 +10,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from openstack_dashboard.test.test_panels.second_panel import views from openstack_dashboard.test.test_panels.second_panel import views
urlpatterns = patterns( urlpatterns = [
'',
url(r'^$', views.IndexView.as_view(), name='index'), 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 import settings
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls.static import static # noqa from django.conf.urls.static import static # noqa
from django.conf.urls import url from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa 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.test.jasmine import jasmine
from openstack_dashboard import views
import horizon import horizon
urlpatterns = patterns( urlpatterns = [
'', url(r'^$', views.splash, name='splash'),
url(r'^$', 'openstack_dashboard.views.splash', name='splash'),
url(r'^auth/', include('openstack_auth.urls')), 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'^jasmine/(.*?)$', jasmine.dispatcher),
url(r'', include(horizon.urls)), url(r'', include(horizon.urls)),
) ]
# Development static app and project media serving using the staticfiles app. # Development static app and project media serving using the staticfiles app.
urlpatterns += staticfiles_urlpatterns() urlpatterns += staticfiles_urlpatterns()
@ -46,7 +47,4 @@ urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG: if settings.DEBUG:
urlpatterns += patterns( urlpatterns.append(url(r'^500/$', defaults.server_error))
'',
url(r'^500/$', 'django.views.defaults.server_error')
)

View File

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