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