1 # -*- coding: utf-8 -*-
3 # portal/urls.py: URL mappings for the portal application
4 # This file is part of the Manifold project.
7 # Jordan Augé <jordan.auge@lip6.fr>
8 # Copyright 2013, UPMC Sorbonne Universités / LIP6
10 # This program is free software; you can redistribute it and/or modify it under
11 # the terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 3, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful, but WITHOUT
15 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19 # You should have received a copy of the GNU General Public License along with
20 # this program; see the file COPYING. If not, write to the Free Software
21 # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 from django.views.generic.base import TemplateView
24 from django.conf.urls import patterns, include, url
26 from portal.platformsview import PlatformsView
27 from portal.platformview import PlatformView
28 from portal.dashboardview import DashboardView
29 from portal.accountview import AccountView, account_process
30 from portal.contactview import ContactView
31 from portal.slicerequestview import SliceRequestView
32 from portal.registrationview import RegistrationView
33 #from portal.sliceview import SliceView
36 from portal.demo_sliceview import SliceView
38 # hopefully these should move in dedicated source files too
39 from portal.views import PresViewView, pres_view_static, pres_view_methods, pres_view_animation
40 from portal.views import ValidatePendingView
43 # DEPRECATED #named_register_forms = (
44 # DEPRECATED # ("step1", RegisterUserForm),
45 # DEPRECATED # ("step2", RegisterUserStep2Form)
48 # DEPRECATED #register_wizard = RegisterUserWizardView.as_view(named_register_forms,
49 # DEPRECATED # url_name="register_wizard_step")
51 urlpatterns = patterns('',
53 #url(r'^user/register/?$', UserRegisterView.as_view(), name='user_register'),
54 url(r'^user/register/complete/$',
55 TemplateView.as_view(template_name='user_register_complete.html'),
56 name='user_register_complete'),
58 #url(r'^user/validate/?$', UserValidateView.as_view(), name='user_validate'),
59 url(r'^dashboard/?$', DashboardView.as_view(), name='dashboard'),
60 #url(r'^my_account/?$', MyAccountView.as_view(), name='my_account'),
61 url(r'^account/?$', AccountView.as_view(), name='account'),
62 url(r'^platforms/?$', PlatformsView.as_view(), name='platforms'),
63 url(r'^platform/(?P<platformname>[\w\.]+)/?$', PlatformView.as_view(), name='platform'),
64 url(r'^slice/?$',SliceView.as_view(),name='slice'),
65 url(r'^slice/(?P<slicename>[\w\.]+)/?$', SliceView.as_view(),name='slice'),
66 url(r'^account/account_process/?$', account_process),
67 url(r'^register/?$', RegistrationView.as_view(), name='registration'),
68 url(r'^contact/?$', ContactView.as_view(), name='contact'),
70 url(r'^slice_request/?$', SliceRequestView.as_view(), name='slice_request'),
71 # Validate pending requests
72 url(r'^validate/?$', ValidatePendingView.as_view()),
73 # http://stackoverflow.com/questions/2360179/django-urls-how-to-pass-a-list-of-items-via-clean-urls
74 # (r'^validate_action/(?P<constraints>[^/]+)/(?P<id>\w+)/?$', 'portal.views.pres_view_static'),
75 (r'^validate_action(?P<id>(?:/\w+)+)/?$', 'portal.actions.validate_action'),
77 url(r'^pres_view/?$', PresViewView.as_view(), name='pres_view'),
78 (r'^methods/(?P<type>\w+)/?$', 'portal.views.pres_view_methods'),
79 (r'^animation/(?P<constraints>[^/]+)/(?P<id>\w+)/?$', 'portal.views.pres_view_animation'),
80 (r'^static/(?P<constraints>[^/]+)/(?P<id>\w+)/?$', 'portal.views.pres_view_static'),
81 #url(r'^slice/request/?$', views.slice_request, name='slice_request'),
83 #url(r'^slice/validate/?$', views.slice_validate, name='slice_validate'),
85 # (r'^accounts/', include('registration.backends.default.urls')),
88 # DEPRECATED # url(r'^$', views.index, name='index'),
89 # DEPRECATED # url(r"^registerwizard/(?P<step>[-\w]+)/$", register_wizard,
90 # DEPRECATED # name="register_wizard_step"),
91 # DEPRECATED # url(r"^registerwizard/$", register_wizard, name="register_wizard")