79a808d35660c4cedabbc1eabe7fbd723585759b
[myslice.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.sliceview
13 import portal.platformsview
14 import portal.dashboardview
15
16 # main entry point (set to the / URL)
17 ## beware before adopting this one
18 # if anything goes wrong in this page you end up in an endless cycle
19 #default_view=portal.platformsview.PlatformsView.as_view()
20 default_view='auth.views.login_user'
21 # where to be redirected after login
22 after_login_view=portal.dashboardview.DashboardView.as_view()
23
24 urlpatterns = patterns(
25     '',
26     # Examples:
27     # url(r'^$', 'myslice.views.home', name='home'),
28     # url(r'^myslice/', include('myslice.foo.urls')),
29     # Uncomment the admin/doc line below to enable admin documentation:
30     # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
31     # Uncomment the next line to enable the admin:
32     # url(r'^admin/', include(admin.site.urls)),
33     #
34     # default / view
35     #
36     (r'^/?$', default_view),
37     #
38     # login / logout
39     #
40     (r'^login-ok/?$', after_login_view),
41     # seems to be what login_required uses to redirect ...
42     (r'^accounts/login/$', 'auth.views.login_user'),
43     (r'^login/?$', 'auth.views.login_user'),
44     (r'^logout/?$', 'auth.views.logout_user'),
45     #
46     # the manifold proxy
47     #
48     (r'^manifold/proxy/(?P<format>\w+)/?$', 'manifold.manifoldproxy.proxy'),
49     # 
50     # the slice view
51     #
52     (r'^slice/?$',                        portal.sliceview.SliceView.as_view()),
53     (r'^slice/(?P<slicename>[\w\.]+)/?$', portal.sliceview.SliceView.as_view()),
54     #
55     # various trash views
56     #
57     (r'^tab/?$',                          'trash.sampleviews.tab_view'),
58     (r'^scroll/?$',                       'trash.sampleviews.scroll_view'),
59     (r'^plugin/?$',                       'trash.pluginview.test_plugin_view'),
60     (r'^dashboard/?$',                    'trash.dashboard.dashboard_view'),
61     # Portal
62     url(r'^portal/', include('portal.urls')),
63     # Portal
64     url(r'^sample/', include('sample.urls')),
65     # Debug
66     url(r'^debug/', include('debug_platform.urls')),
67     # Static files
68     (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
69
70
71 )