1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
from django.conf.urls import url
from django.views.generic.base import RedirectView
from . import views
app_name = "photos"
urlpatterns = [
url(
r'data/(?P<slug>[-\w]+)/$',
views.photo_json
),
url(
r'data/admin/preview/(?P<pk>\d+)/$',
views.photo_preview_json,
name="admin_image_preview"
),
url(
r'data/admin/tn/(?P<pk>\d+)/$',
views.thumb_preview_json,
name="admin_thumb_preview"
),
url(
r'galleries/private/(?P<slug>[-\w]+)$',
views.PrivateGallery.as_view(),
name="private"
),
url(
r'galleries/private/(?P<page>\d+)/$',
views.PrivateGalleryList.as_view(),
name="private_list"
),
url(
r'galleries/private/$',
RedirectView.as_view(url="/photos/galleries/private/1/", permanent=False)
),
url(
r'galleries/(?P<slug>[-\w]+)$',
views.Gallery.as_view(),
name="private"
),
url(
r'galleries/(?P<page>\d+)/$',
views.GalleryList.as_view(),
name="private_list"
),
url(
r'galleries/$',
RedirectView.as_view(url="/photos/galleries/1/", permanent=False)
),
url(
r'(?P<page>\d+)/$',
views.gallery_list,
),
url(
r'(?P<slug>[-\w]+)/$',
RedirectView.as_view(url="/photos/%(slug)s/1/", permanent=False)
),
url(
r'',
RedirectView.as_view(url="/photos/1/", permanent=False)
),
]
|