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
|
2013-08-02 13:23:46 +04:00
|
|
|
from django.conf.urls.static import static # noqa
|
2014-09-16 14:07:57 +04:00
|
|
|
from django.conf.urls import url
|
2013-08-02 13:23:46 +04:00
|
|
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa
|
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
|
|
|
|
|
2016-02-15 14:04:21 +00:00
|
|
|
from openstack_dashboard.api import rest
|
|
|
|
from openstack_dashboard import views
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
url(r'^$', views.splash, name='splash'),
|
|
|
|
url(r'^api/', include(rest.urls)),
|
2014-11-24 15:08:13 +11:00
|
|
|
url(r'', include(horizon.urls)),
|
2016-02-15 14:04:21 +00:00
|
|
|
]
|
2011-01-12 13:43:31 -08:00
|
|
|
|
2015-03-13 04:10:02 +00:00
|
|
|
for u in getattr(settings, 'AUTHENTICATION_URLS', ['openstack_auth.urls']):
|
2016-02-15 14:04:21 +00:00
|
|
|
urlpatterns.append(url(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:
|
2016-02-15 14:04:21 +00:00
|
|
|
urlpatterns.append(url(r'^500/$', defaults.server_error))
|