2012-02-04 17:40:31 -06:00
|
|
|
# Copyright 2012 United States Government as represented by the
|
2011-01-12 13:43:31 -08:00
|
|
|
# Administrator of the National Aeronautics and Space Administration.
|
|
|
|
# All Rights Reserved.
|
|
|
|
#
|
2012-02-04 17:40:31 -06:00
|
|
|
# Copyright 2012 Nebula, Inc.
|
2011-07-03 21:10:53 -07:00
|
|
|
#
|
2011-01-12 13:43:31 -08:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
# not use this file except in compliance with the License. You may obtain
|
|
|
|
# a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
|
|
|
|
"""
|
|
|
|
URL patterns for the OpenStack Dashboard.
|
|
|
|
"""
|
|
|
|
|
2014-01-03 17:31:49 +01:00
|
|
|
from django.conf import settings
|
2014-09-25 16:13:02 +04:00
|
|
|
from django.conf.urls import include
|
2017-03-17 19:15:23 +00:00
|
|
|
from django.conf.urls.static import static
|
|
|
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
2022-01-27 00:07:02 +09:00
|
|
|
from django.urls import re_path
|
2016-02-15 14:04:21 +00:00
|
|
|
from django.views import defaults
|
2011-01-12 13:43:31 -08:00
|
|
|
|
2011-10-31 11:31:05 -07:00
|
|
|
import horizon
|
2017-12-12 15:24:26 +09:00
|
|
|
import horizon.base
|
2018-03-14 11:43:12 +09:00
|
|
|
from horizon.browsers import views as browsers_views
|
|
|
|
from horizon.decorators import require_auth
|
2011-10-31 11:31:05 -07:00
|
|
|
|
2016-02-15 14:04:21 +00:00
|
|
|
from openstack_dashboard.api import rest
|
|
|
|
from openstack_dashboard import views
|
|
|
|
|
|
|
|
urlpatterns = [
|
2022-01-27 00:07:02 +09:00
|
|
|
re_path(r'^$', views.splash, name='splash'),
|
|
|
|
re_path(r'^api/', include(rest.urls)),
|
|
|
|
re_path(r'^header/', views.ExtensibleHeaderView.as_view()),
|
|
|
|
re_path(r'', horizon.base._wrapped_include(horizon.urls)),
|
2016-02-15 14:04:21 +00:00
|
|
|
]
|
2011-01-12 13:43:31 -08:00
|
|
|
|
2018-03-14 11:43:12 +09:00
|
|
|
# add URL for ngdetails
|
2022-01-27 00:07:02 +09:00
|
|
|
ngdetails_url = re_path(r'^ngdetails/',
|
|
|
|
browsers_views.AngularDetailsView.as_view(),
|
|
|
|
name='ngdetails')
|
2018-03-14 11:43:12 +09:00
|
|
|
urlpatterns.append(ngdetails_url)
|
|
|
|
horizon.base._decorate_urlconf([ngdetails_url], require_auth)
|
|
|
|
|
2019-04-11 09:51:31 +09:00
|
|
|
for u in settings.AUTHENTICATION_URLS:
|
2022-01-27 00:07:02 +09:00
|
|
|
urlpatterns.append(re_path(r'^auth/', include(u)))
|
2015-03-13 04:10:02 +00:00
|
|
|
|
2011-08-29 17:41:35 -07:00
|
|
|
# Development static app and project media serving using the staticfiles app.
|
|
|
|
urlpatterns += staticfiles_urlpatterns()
|
|
|
|
|
|
|
|
# Convenience function for serving user-uploaded media during
|
|
|
|
# development. Only active if DEBUG==True and the URL prefix is a local
|
|
|
|
# path. Production media should NOT be served by Django.
|
|
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
2012-11-14 18:30:39 +11:00
|
|
|
|
|
|
|
if settings.DEBUG:
|
2022-01-27 00:07:02 +09:00
|
|
|
urlpatterns.append(re_path(r'^500/$', defaults.server_error))
|