view user_photos/urls.py @ 953:8647a669edb4

Fix excessive cache usage for forum date/times. Issue #84. Hitting the cache 30+ times while browsing the forums to adjust all the dates/times into the user's time zone. Just hit the user's profile and be done with it. It should be loaded.
author Brian Neal <bgneal@gmail.com>
date Tue, 19 May 2015 21:08:45 -0500
parents 71d17d267e27
children 4f265f61874b
line wrap: on
line source
"""URLs for the user_photos application."""
from django.conf.urls import patterns, url
from django.views.generic import DetailView

from user_photos.models import Photo
from user_photos.views import GalleryView


urlpatterns = patterns('',
    url(r'^upload/$', 'user_photos.views.upload', name='user_photos-upload'),
    url(r'^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(),
        name='user_photos-gallery'),
    url(r'^delete/$', 'user_photos.views.delete', name='user_photos-delete'),
)