Mercurial > public > sg101
comparison user_photos/urls.py @ 1028:5ba2508939f7
Django 1.8 changes; first batch.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 15 Dec 2015 21:01:07 -0600 |
parents | 4f265f61874b |
children | d9cd3180c12c |
comparison
equal
deleted
inserted
replaced
1027:cd4db27c90e3 | 1028:5ba2508939f7 |
---|---|
1 """URLs for the user_photos application.""" | 1 """URLs for the user_photos application.""" |
2 from django.conf.urls import patterns, url | 2 from django.conf.urls import url |
3 from django.views.generic import DetailView | 3 from django.views.generic import DetailView |
4 | 4 |
5 from user_photos.models import Photo | 5 from user_photos.models import Photo |
6 from user_photos.views import GalleryView | 6 import user_photos.views |
7 | 7 |
8 | 8 |
9 urlpatterns = patterns('', | 9 urlpatterns = [ |
10 url(r'^upload/$', 'user_photos.views.upload', name='user_photos-upload'), | 10 url(r'^upload/$', user_photos.views.upload, name='user_photos-upload'), |
11 url(r'^upload-ajax/$', | 11 url(r'^upload-ajax/$', |
12 'user_photos.views.upload_ajax', | 12 user_photos.views.upload_ajax, |
13 name='user_photos-upload_ajax'), | 13 name='user_photos-upload_ajax'), |
14 url(r'^photo/(?P<pk>\d+)/$', | 14 url(r'^photo/(?P<pk>\d+)/$', |
15 DetailView.as_view(model=Photo), | 15 DetailView.as_view(model=Photo), |
16 name='user_photos-detail'), | 16 name='user_photos-detail'), |
17 url(r'^gallery/(?P<username>[\w.@+-]{1,30})/$', | 17 url(r'^gallery/(?P<username>[\w.@+-]{1,30})/$', |
18 GalleryView.as_view(), | 18 user_photos.views.GalleryView.as_view(), |
19 name='user_photos-gallery'), | 19 name='user_photos-gallery'), |
20 url(r'^delete/$', 'user_photos.views.delete', name='user_photos-delete'), | 20 url(r'^delete/$', user_photos.views.delete, name='user_photos-delete'), |
21 url(r'^hotlink/$', | 21 url(r'^hotlink/$', |
22 'user_photos.views.hotlink_image', | 22 user_photos.views.hotlink_image, |
23 name='user_photos-hotlink'), | 23 name='user_photos-hotlink'), |
24 ) | 24 ] |