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'),
14 url(r'^file/upload', 'explorer.views.file_upload', name='file_upload'),
16 url(r'^images/(?P<folder>[^/]+)/$', 'explorer.views.folder_images', name='folder_image'),
17 url(r'^images/$', 'explorer.views.folder_images', {'folder': '.'}, name='folder_image_ajax'),
20 url(r'^editor/panel/xmleditor/'+PATH_END, 'explorer.views.xmleditor_panel', name='xmleditor_panel'),
21 url(r'^editor/panel/gallery/'+PATH_END, 'explorer.views.gallery_panel', name='gallery_panel'),
22 url(r'^editor/panel/htmleditor/'+PATH_END, 'explorer.views.htmleditor_panel', name='htmleditor_panel'),
23 url(r'^editor/panel/dceditor/'+PATH_END, 'explorer.views.dceditor_panel', name='dceditor_panel'),
24 url(r'^editor/'+PATH_END, 'explorer.views.display_editor', name='editor_view'),
27 url(r'^manager/pull-requests$', 'explorer.views.pull_requests'),
30 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
31 url(r'^admin/(.*)', admin.site.root),
34 url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'redirect_field_name': 'next'}),
35 url(r'^accounts/logout$', 'django.contrib.auth.views.logout', {'next_page': '/'}),
41 urlpatterns += patterns('',
42 url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
43 {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
44 url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
45 {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),