1 from django
.conf
.urls
.defaults
import *
2 from registration
.views
import activate
, register
3 from registration
.forms
import RegistrationFormUniqueEmail
4 from registration
.backends
import default
5 from django
.contrib
.auth
.views
import logout
6 from django
.views
.generic
.simple
import direct_to_template
8 urlpatterns
= patterns('mygpo.web.views',
10 (r
'^media/logo/(?P<size>\d+)/(?P<filename>[^/]*)\.jpg$', 'cover_art'),
11 (r
'^logo/(?P<size>\d+)/(?P<filename>[^/]*)\.jpg$', 'cover_art'),
12 (r
'^history/$', 'history'),
13 (r
'^suggestions/$', 'suggestions'),
14 (r
'^tags/', 'mytags'),
15 (r
'^online-help', direct_to_template
, {'template': 'online-help.html'}),
18 urlpatterns
+= patterns('mygpo.web.views.subscriptions',
19 (r
'^subscriptions/$', 'list'),
20 (r
'^download/subscriptions\.opml$', 'download_all'),
21 (r
'^subscriptions/all.opml$', 'download_all'),
22 (r
'^user/(?P<username>\w+)/subscriptions$', 'for_user'),
23 (r
'^user/(?P<username>\w+)/subscriptions\.opml$', 'for_user_opml'),
26 urlpatterns
+= patterns('mygpo.web.views.podcast',
27 (r
'^podcast/(?P<pid>\w+)$', 'show'),
28 (r
'^subscribe', 'subscribe_url'),
29 (r
'^podcast/(?P<pid>\w+)/subscribe$', 'subscribe'),
30 (r
'^podcast/(?P<pid>\w+)/unsubscribe/(?P<device_id>\d+)', 'unsubscribe'),
31 (r
'^podcast/(?P<pid>\w+)/add-tag', 'add_tag'),
32 (r
'^podcast/(?P<pid>\w+)/remove-tag', 'remove_tag'),
35 urlpatterns
+= patterns('mygpo.web.views.episode',
36 (r
'^episode/(?P<id>\d+)$', 'episode'),
37 (r
'^episode/(?P<id>\d+)/add-chapter$', 'add_chapter'),
38 (r
'^episode/(?P<id>\d+)/remove-chapter/(?P<chapter_id>\d+)$', 'remove_chapter'),
39 (r
'^episode/(?P<id>\d+)/toggle-favorite', 'toggle_favorite'),
40 (r
'^favorites/', 'list_favorites'),
43 urlpatterns
+= patterns('mygpo.web.views.settings',
44 (r
'^account/$', 'account'),
45 (r
'^account/privacy$', 'privacy'),
46 (r
'^account/delete$', 'delete_account'),
47 (r
'^share/$', 'share'),
50 urlpatterns
+= patterns('mygpo.web.views.public',
51 (r
'^directory/$', 'browse'),
52 (r
'^directory/(?P<category>[^/]+)$', 'category'),
53 (r
'^toplist/$', 'toplist'),
54 (r
'^toplist/episodes$', 'episode_toplist'),
55 (r
'^gpodder-examples.opml$', 'gpodder_example_podcasts'),
58 urlpatterns
+= patterns('mygpo.web.views.device',
59 (r
'^devices/$', 'overview'),
60 (r
'^device/(?P<device_id>\d+)$', 'show'),
61 (r
'^device/(?P<device_id>\d+).opml$', 'opml'),
62 (r
'^device/(?P<device_id>\d+)/sync$', 'sync'),
63 (r
'^device/(?P<device_id>\d+)/unsync$', 'unsync'),
64 (r
'^device/(?P<device_id>\d+)/delete$', 'delete'),
65 (r
'^device/(?P<device_id>\d+)/remove$', 'delete_permanently'),
66 (r
'^device/(?P<device_id>\d+)/undelete$', 'undelete'),
67 (r
'^device/(?P<device_id>\d+)/history$', 'history'),
68 (r
'^device/(?P<device_id>\d+)/edit$', 'edit'),
71 urlpatterns
+= patterns('mygpo.web.views.users',
72 (r
'^login/$', 'login_user'),
73 (r
'^logout/$', logout
, {'next_page': '/'}),
74 (r
'^migrate/$', 'migrate_user'),
75 (r
'^register/resend-activation$', 'resend_activation'),
76 (r
'^register/restore_password$', 'restore_password'),
77 (r
'^register/$', register
,
78 {'backend': 'registration.backends.default.DefaultBackend',
79 'form_class': RegistrationFormUniqueEmail
}),
80 (r
'^registration_complete/$', direct_to_template
,
81 {'template': 'registration/registration_complete.html'}),
82 (r
'^activate/(?P<activation_key>\w+)$', activate
,
83 {'backend': 'registration.backends.default.DefaultBackend'}),