1 from django.conf.urls.defaults import *
2 from django.contrib import admin
3 from django.conf import settings
6 PATH_END = r"(?P<path>[^/]+)$"
8 urlpatterns = patterns('',
10 url(r'^$', 'explorer.views.file_list', name='file_list'),
12 url(r'^file/text/'+PATH_END, 'explorer.views.file_xml', name='file_xml'),
13 url(r'^file/dc/'+PATH_END, 'explorer.views.file_dc', name='file_dc'),
15 url(r'^images/(?P<folder>[^/]+)/$', 'explorer.views.folder_images', name='folder_image'),
16 url(r'^images/$', 'explorer.views.folder_images', {'folder': '.'}, name='folder_image_ajax'),
19 url(r'^editor/panel/xmleditor/'+PATH_END, 'explorer.views.xmleditor_panel', name='xmleditor_panel'),
20 url(r'^editor/panel/gallery/'+PATH_END, 'explorer.views.gallery_panel', name='gallery_panel'),
21 url(r'^editor/panel/htmleditor/'+PATH_END, 'explorer.views.htmleditor_panel', name='htmleditor_panel'),
22 url(r'^editor/panel/dceditor/'+PATH_END, 'explorer.views.dceditor_panel', name='dceditor_panel'),
23 url(r'^editor/'+PATH_END, 'explorer.views.display_editor', name='editor_view'),
26 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
27 url(r'^admin/(.*)', admin.site.root),
30 url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'redirect_field_name': 'next_page'}),
31 url(r'^accounts/logout$', 'django.contrib.auth.views.logout', {'next_page': '/'}), # {'redirect_field_name': 'next_page'}),
37 urlpatterns += patterns('',
38 url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
39 {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
40 url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
41 {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),