1 from django
.conf
.urls
import url
2 from django
.contrib
.auth
.views
import logout
3 from django
.views
.generic
.base
import TemplateView
, RedirectView
5 from mygpo
.web
.logo
import CoverArt
8 from .views
import settings
, device
, users
17 url(r
'^logo/(?P<size>\d+)/(?P<prefix>.{3})/(?P<filename>[^/]*)$',
27 url
='http://gpoddernet.readthedocs.org/en/latest/user/index.html',
33 TemplateView
.as_view(template_name
='developer.html')),
36 TemplateView
.as_view(template_name
='contribute.html'),
40 TemplateView
.as_view(template_name
='privacy_policy.html'),
41 name
='privacy-policy'),
47 url(r
'^account/privacy$',
51 url(r
'^account/profile$',
52 settings
.ProfileView
.as_view(),
55 url(r
'^account/google/remove$',
56 settings
.AccountRemoveGoogle
.as_view(),
57 name
='account-google-remove'),
59 url(r
'^account/flattr$',
60 settings
.FlattrSettingsView
.as_view(),
61 name
='flattr-settings'),
63 url(r
'^account/flattr/token$',
64 settings
.FlattrTokenView
.as_view(),
67 url(r
'^account/flattr/logout$',
68 settings
.FlattrLogout
.as_view(),
69 name
='flattr-logout'),
71 url(r
'^account/privacy/default-public$',
72 settings
.DefaultPrivacySettings
.as_view(public
=True),
73 name
='privacy_default_public'),
75 url(r
'^account/privacy/default-private$',
76 settings
.DefaultPrivacySettings
.as_view(public
=False),
77 name
='privacy_default_private'),
79 url(r
'^account/privacy/(?P<podcast_id>[\w]+)/public$',
80 settings
.PodcastPrivacySettings
.as_view(public
=True),
81 name
='privacy_podcast_public'),
83 url(r
'^account/privacy/(?P<podcast_id>[\w]+)/private$',
84 settings
.PodcastPrivacySettings
.as_view(public
=False),
85 name
='privacy_podcast_private'),
87 url(r
'^account/delete$',
88 settings
.delete_account
,
89 name
='delete-account'),
95 url(r
'^devices/create-device$',
97 name
='device-create'),
99 url(r
'^device/(?P<uid>[\w.-]+)\.opml$',
103 url(r
'^device/(?P<uid>[\w.-]+)$',
107 url(r
'^device/(?P<uid>[\w.-]+)/symbian.opml$',
109 name
='device-symbian-opml'),
111 url(r
'^device/(?P<uid>[\w.-]+)/sync$',
115 url(r
'^device/(?P<uid>[\w.-]+)/unsync$',
117 name
='device-unsync'),
119 url(r
'^device/(?P<uid>[\w.-]+)/resync$',
121 name
='trigger-sync'),
123 url(r
'^device/(?P<uid>[\w.-]+)/delete$',
125 name
='device-delete'),
127 url(r
'^device/(?P<uid>[\w.-]+)/remove$',
128 device
.delete_permanently
,
129 name
='device-delete-permanently'),
131 url(r
'^device/(?P<uid>[\w.-]+)/undelete$',
133 name
='device-undelete'),
135 url(r
'^device/(?P<uid>[\w.-]+)/edit$',
139 url(r
'^device/(?P<uid>[\w.-]+)/update$',
141 name
='device-update'),
143 url(r
'^device/(?P<uid>[\w.-]+)/upload-opml$',
145 name
='device-upload-opml'),
147 url(r
'^register/restore_password$',
148 users
.restore_password
,
149 name
='restore-password'),
152 users
.LoginView
.as_view(),
155 url(r
'^login/google$',
156 users
.GoogleLogin
.as_view(),
157 name
='login-google'),
159 url(r
'^login/oauth2callback$',
160 users
.GoogleLoginCallback
.as_view(),
161 name
='login-google-callback'),
165 kwargs
={'next_page': '/'},