Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- a/user_photos/urls.py Mon Dec 14 20:42:20 2015 -0600 +++ b/user_photos/urls.py Tue Dec 15 21:01:07 2015 -0600 @@ -1,24 +1,24 @@ """URLs for the user_photos application.""" -from django.conf.urls import patterns, url +from django.conf.urls import url from django.views.generic import DetailView from user_photos.models import Photo -from user_photos.views import GalleryView +import user_photos.views -urlpatterns = patterns('', - url(r'^upload/$', 'user_photos.views.upload', name='user_photos-upload'), +urlpatterns = [ + url(r'^upload/$', user_photos.views.upload, name='user_photos-upload'), url(r'^upload-ajax/$', - 'user_photos.views.upload_ajax', + user_photos.views.upload_ajax, name='user_photos-upload_ajax'), url(r'^photo/(?P<pk>\d+)/$', DetailView.as_view(model=Photo), name='user_photos-detail'), url(r'^gallery/(?P<username>[\w.@+-]{1,30})/$', - GalleryView.as_view(), + user_photos.views.GalleryView.as_view(), name='user_photos-gallery'), - url(r'^delete/$', 'user_photos.views.delete', name='user_photos-delete'), + url(r'^delete/$', user_photos.views.delete, name='user_photos-delete'), url(r'^hotlink/$', - 'user_photos.views.hotlink_image', + user_photos.views.hotlink_image, name='user_photos-hotlink'), -) +]