1 # Copyright (C) 2010 Oregon State University et al.
2 # Copyright (C) 2010 Greek Research and Technology Network
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 from django
.conf
import settings
21 from django
.conf
.urls
.defaults
import *
23 # Uncomment the next two lines to enable the admin:
24 #from django.contrib import admin
27 urlpatterns
= patterns('',
28 (r
'^', include('ganeti_web.urls')),
29 (r
'^', include('object_permissions.urls')),
30 (r
'^', include('object_log.urls')),
31 (r
'^', include('muddle_users.urls')),
34 # account/activate/<key>/ - Activate a user
35 # account/activate/complete/ - Ater-activation page
36 # account/register/ - User registration form
37 # account/register/complete/ - After-registration page
38 # account/register/closed/ - No registration allowed page
40 # account/login - login page
41 # account/logout - logout page
42 # account/password/reset/ - send password reset email
43 # account/password/change/ - change current user password
46 url(r
'^accounts/login/?', 'django.contrib.auth.views.login', name
="login",),
47 url(r
'^accounts/logout/?', 'django.contrib.auth.views.logout', \
48 {'next_page':'/'}, name
="logout"),
49 (r
'^accounts/', include('registration.urls')),
52 (r
'^500/$', 'django.views.generic.simple.direct_to_template', {'template':"500.html"})
55 urlpatterns
+= patterns('',
56 (r
'^i18n/', include('django.conf.urls.i18n')),
58 handler500
= 'ganeti_web.views.view_500'
61 #The following is used to serve up local media files like images
62 #if settings.LOCAL_DEV:
64 urlpatterns
+= patterns('',
65 (r
'^media/(?P<path>.*)', 'django.views.static.serve',\
66 {'document_root': settings
.MEDIA_ROOT
}),
68 (r
'^favicon.ico', 'django.views.static.serve',
69 {'document_root': settings
.MEDIA_ROOT
, 'path': 'favicon.ico'}),
72 (r
'^novnc/(?P<path>.*)', 'django.views.static.serve',\
73 {'document_root': '%s/noVNC/include' % settings
.DOC_ROOT
}),