1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
3
# Copyright 2010 United States Government as represented by the
4
# Administrator of the National Aeronautics and Space Administration.
7
# Licensed under the Apache License, Version 2.0 (the "License"); you may
8
# not use this file except in compliance with the License. You may obtain
9
# a copy of the License at
11
# http://www.apache.org/licenses/LICENSE-2.0
13
# Unless required by applicable law or agreed to in writing, software
14
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
# License for the specific language governing permissions and limitations
20
URL patterns for the OpenStack Dashboard.
23
from django.conf.urls.defaults import *
24
from django.conf import settings
25
from django.contrib import admin
26
from django.views import generic as generic_views
27
import django.views.i18n
28
from registration import forms as reg_forms
33
urlpatterns = patterns('',
34
url(r'^$', 'dashboard.views.index', name='index'),
35
url(r'^i18n/setlang', django.views.i18n.set_language),
36
url(r'^accounts/register/$',
37
'registration.views.register',
38
{'form_class': reg_forms.RegistrationFormUniqueEmail},
39
name='registration_register'),
40
url(r'^accounts/', include('registration.urls')),
41
url(r'^project/', include('django_openstack.nova.urls.project')),
42
url(r'^region/', include('django_openstack.nova.urls.region')),
43
url(r'^admin/project/', include('django_openstack.nova.urls.admin_project')),
44
url(r'^admin/roles/', include('django_openstack.nova.urls.admin_roles')),
45
url(r'^admin/', include(admin.site.urls)),
46
url(r'^syspanel/', include('django_nova_syspanel.urls')),
49
urlpatterns += patterns('',
50
# TODO(devcamcar): Move permission denied template into django-openstack.
52
generic_views.TemplateView.as_view(template_name='permission_denied.html'),
53
{'name': 'dashboard_permission_denied'}),
54
url(r'^unavailable/$',
55
generic_views.TemplateView.as_view(template_name='unavailable.html'),
56
{'name': 'nova_unavailable'}),
59
urlpatterns += patterns('',
60
(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
61
'django.views.static.serve',
62
{'document_root': settings.MEDIA_ROOT,
63
'show_indexes': True}),