summaryrefslogtreecommitdiff
path: root/app/photos/urls.py
blob: 0c7b7527f7502291a6557899eef842c6896e2b43 (plain)
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
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'galleries/private/(?P<slug>[-\w]+)$',
        views.PrivateGallery.as_view(),
        name="private"
    ),
    url(
        r'galleries/(?P<slug>[-\w]+)/$',
        views.gallery,
    ),
    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)
    ),
]