comparison user_photos/urls.py @ 1158:364f8ec48612

Updated User Photos to V3 design.
author Brian Neal <bgneal@gmail.com>
date Mon, 23 Jan 2017 20:17:50 -0600
parents d9cd3180c12c
children
comparison
equal deleted inserted replaced
1157:e4f2d6a4b401 1158:364f8ec48612
1 """URLs for the user_photos application.""" 1 """URLs for the user_photos application."""
2 from django.conf.urls import url 2 from django.conf.urls import url
3 from django.views.generic import DetailView
4 3
5 from user_photos.models import Photo
6 import user_photos.views 4 import user_photos.views
7 5
8 6
9 urlpatterns = [ 7 urlpatterns = [
10 url(r'^upload/$', user_photos.views.upload, name='user_photos-upload'), 8 url(r'^upload/$', user_photos.views.upload, name='user_photos-upload'),
13 name='user_photos-upload_ajax'), 11 name='user_photos-upload_ajax'),
14 url(r'^upload-ajax-v3/$', 12 url(r'^upload-ajax-v3/$',
15 user_photos.views.upload_ajax_v3, 13 user_photos.views.upload_ajax_v3,
16 name='user_photos-upload_ajax_v3'), 14 name='user_photos-upload_ajax_v3'),
17 url(r'^photo/(?P<pk>\d+)/$', 15 url(r'^photo/(?P<pk>\d+)/$',
18 DetailView.as_view(model=Photo), 16 user_photos.views.PhotoView.as_view(),
19 name='user_photos-detail'), 17 name='user_photos-detail'),
20 url(r'^gallery/(?P<username>[\w.@+-]{1,30})/$', 18 url(r'^gallery/(?P<username>[\w.@+-]{1,30})/$',
21 user_photos.views.GalleryView.as_view(), 19 user_photos.views.GalleryView.as_view(),
22 name='user_photos-gallery'), 20 name='user_photos-gallery'),
23 url(r'^delete/$', user_photos.views.delete, name='user_photos-delete'), 21 url(r'^delete/$', user_photos.views.delete, name='user_photos-delete'),