from django.conf.urls import *
from django.contrib import admin
import views
from django.conf import settings

urlpatterns = patterns('',
    (r'^$', views.index),
    (r'^api/image/(?P<galleryId>\w+)/(?P<chartId>\w+)$', views.chartImage),
    (r'^api/(?P<galleryId>\w+)/(?P<chartId>\w+)$', views.chartAttrs),
    (r'^(?P<galleryId>\w+)/$', views.gallery),
    (r'^(?P<galleryId>\w+)/kind/(?P<chartType>\w+)/$', views.typeIndex),
    (r'^(?P<galleryId>\w+)/(?P<chartId>\w+)/$', views.chart),
)
if False:# settings.DEBUG:
    import os
    from docengine.contrib import chartgallery as P
    urlpatterns += patterns('',
        (r'^media/chartgallery/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': os.path.join(P.__path__[0],'media','chartgallery'), 'show_indexes':True}),
        )
