1
from django.conf.urls.defaults import *
2
import settings,os
3
from gallery import views as gallery
4
5
# Uncomment the next two lines to enable the admin:
6
# from django.contrib import admin
7
# admin.autodiscover()
8
9
urlpatterns = patterns('',
10
    # Example:
11
    # (r'^dphoto/', include('dphoto.foo.urls')),
12
13
    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
14
    # to INSTALLED_APPS to enable admin documentation:
15
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
16
17
    # Uncomment the next line to enable the admin:
18
    # (r'^admin/(.*)', admin.site.root),
19
    (r'^menu/$', 'menu.create'),
20
    (r'^media/(.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT,'show_indexes':True}),
21
    (r'^data/gallery/(.*)$', 'django.views.static.serve', {'document_root': settings.GALLERY_ROOT,'show_indexes':True}),
22
    (r'^data/previews/(.*)$', 'django.views.static.serve', {'document_root': settings.PREVIEWS_ROOT,'show_indexes':True}),
23
    (r'^data/thumbs/(.*)$', 'django.views.static.serve', {'document_root': settings.THUMBNAILS_ROOT,'show_indexes':True}),
24
25
    (r'^thumbnails/(?P<file>.*).png', gallery.thumbnail ),
26
    (r'^previews/(?P<file>.*).*', gallery.preview ),
27
    (r'^original/(?P<file>.*).*', gallery.original ),
28
    (r'^(?P<path>.*)$', gallery.list_dir),
29
    
30
31
32
)