unfinished business on newnames (unsaved pending changes..)
[unfold.git] / myslice / urls.py
1 from django.conf.urls import patterns, include, url
2 from django.conf      import settings
3
4 # Uncomment the next two lines to enable the admin:
5 # from django.contrib import admin
6 # admin.autodiscover()
7
8 # to enable insert_above stuff
9 from django.template.loader import add_to_builtins
10 add_to_builtins('insert_above.templatetags.insert_tags')
11
12 import portal.platformsview
13 import portal.dashboardview
14 import portal.homeview
15
16 home_view=portal.homeview.HomeView.as_view()
17 dashboard_view=portal.dashboardview.DashboardView.as_view()
18 platforms_view=portal.platformsview.PlatformsView.as_view()
19
20 #### high level choices
21 # main entry point (set to the / URL)
22 # beware that if this view is broken you end up in an endless cycle...
23 # maybe platforms_view would be best on the longer run
24 the_default_view=home_view
25 # where to be redirected after login
26 the_after_login_view=dashboard_view
27 # where to redirect when login is required
28 # might need another one ?
29 the_login_view=home_view
30
31 urlpatterns = patterns(
32     '',
33     # Examples:
34     # url(r'^$', 'myslice.views.home', name='home'),
35     # url(r'^myslice/', include('myslice.foo.urls')),
36     # Uncomment the admin/doc line below to enable admin documentation:
37     # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
38     # Uncomment the next line to enable the admin:
39     # url(r'^admin/', include(admin.site.urls)),
40     #
41     # default / view
42     #
43     (r'^/?$', the_default_view),
44     #
45     # login / logout
46     #
47     (r'^login-ok/?$', the_after_login_view, {'state': 'Welcome to MySlice'} ),
48     # seems to be what login_required uses to redirect ...
49     (r'^accounts/login/$', the_login_view),
50     (r'^login/?$', the_login_view),
51     (r'^logout/?$', 'auth.views.logout_user'),
52     #
53     # the manifold proxy
54     #
55     (r'^manifold/proxy/(?P<format>\w+)/?$', 'manifold.manifoldproxy.proxy'),
56     #
57     # Portal
58     url(r'^portal/', include('portal.urls')),
59     # Portal
60     url(r'^sample/', include('sample.urls')),
61     # Debug
62 #    url(r'^debug/', include('debug_platform.urls')),
63     #
64     # various trash views - bound to go away 
65     #
66     url(r'^trash/', include('trash.urls')),
67
68 )