sliceview rewritten as a class-based view
[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
14 # main entry point (set to the / URL)
15 default_view='trash.pluginview.test_plugin_view'
16 #default_view='portal.views.PlatformsView'
17 # where to be redirected after login
18 after_login_view='trash.dashboard.dashboard_view'
19
20 urlpatterns = patterns(
21     '',
22     # Examples:
23     # url(r'^$', 'myslice.views.home', name='home'),
24     # url(r'^myslice/', include('myslice.foo.urls')),
25     # Uncomment the admin/doc line below to enable admin documentation:
26     # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
27     # Uncomment the next line to enable the admin:
28     # url(r'^admin/', include(admin.site.urls)),
29     #
30     # default / view
31     #
32     (r'^/?$', default_view),
33     #
34     # login / logout
35     #
36     (r'^login-ok/?$', after_login_view),
37     # seems to be what login_required uses to redirect ...
38     (r'^accounts/login/$', 'auth.views.login_user'),
39     (r'^login/?$', 'auth.views.login_user'),
40     (r'^logout/?$', 'auth.views.logout_user'),
41     #
42     # the manifold proxy
43     #
44     (r'^manifold/proxy/(?P<format>\w+)/?$', 'manifold.manifoldproxy.proxy'),
45     # 
46     # the slice view
47     #
48     (r'^slice/?$',                        portal.sliceview.SliceView.as_view()),
49     (r'^slice/(?P<slicename>[\w\.]+)/?$', portal.sliceview.SliceView.as_view()),
50     #
51     # various trash views
52     #
53     (r'^tab/?$',                          'trash.sampleviews.tab_view'),
54     (r'^scroll/?$',                       'trash.sampleviews.scroll_view'),
55     (r'^plugin/?$',                       'trash.pluginview.test_plugin_view'),
56     (r'^dashboard/?$',                    'trash.dashboard.dashboard_view'),
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     # Static files
64     (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
65
66
67 )