~devcamcar/horizon/trunk

« back to all changes in this revision

Viewing changes to openstack-dashboard/dashboard/urls.py

  • Committer: Devin Carlen
  • Date: 2011-06-18 05:59:37 UTC
  • Revision ID: devin.carlen@gmail.com-20110618055937-aobwm0buvviijz3o
Moved codebase to GitHub

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
 
 
3
 
# Copyright 2010 United States Government as represented by the
4
 
# Administrator of the National Aeronautics and Space Administration.
5
 
# All Rights Reserved.
6
 
#
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
10
 
#
11
 
#         http://www.apache.org/licenses/LICENSE-2.0
12
 
#
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
17
 
#    under the License.
18
 
 
19
 
"""
20
 
URL patterns for the OpenStack Dashboard.
21
 
"""
22
 
 
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
29
 
 
30
 
 
31
 
admin.autodiscover()
32
 
 
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')),
47
 
)
48
 
 
49
 
urlpatterns += patterns('',
50
 
    # TODO(devcamcar): Move permission denied template into django-openstack.
51
 
    url(r'^denied/$',
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'}),
57
 
)
58
 
 
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}),
64
 
 )