bgneal@695: """URLs for the user_photos application."""
bgneal@695: from django.conf.urls import patterns, url
bgneal@696: from django.views.generic import DetailView
bgneal@696: 
bgneal@696: from user_photos.models import Photo
bgneal@704: from user_photos.views import GalleryView
bgneal@696: 
bgneal@695: 
bgneal@704: urlpatterns = patterns('',
bgneal@704:     url(r'^upload/$', 'user_photos.views.upload', name='user_photos-upload'),
bgneal@722:     url(r'^upload-ajax/$',
bgneal@722:         'user_photos.views.upload_ajax',
bgneal@722:         name='user_photos-upload_ajax'),
bgneal@696:     url(r'^photo/(?P<pk>\d+)/$',
bgneal@696:         DetailView.as_view(model=Photo),
bgneal@704:         name='user_photos-detail'),
bgneal@704:     url(r'^gallery/(?P<username>[\w.@+-]{1,30})/$',
bgneal@704:         GalleryView.as_view(),
bgneal@704:         name='user_photos-gallery'),
bgneal@710:     url(r'^delete/$', 'user_photos.views.delete', name='user_photos-delete'),
bgneal@695: )