1 from django
.conf
.urls
import url
3 from .views
import podcast
, episode
10 name
='subscribe-by-url'),
12 # Podcast Views with UUIDs
13 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/?$',
17 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/subscribe$',
21 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/subscribe/\+all$',
22 podcast
.subscribe_all_id
,
23 name
='subscribe-all-id'),
25 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/unsubscribe/'
26 '(?P<device_uid>[\w.-]+)',
27 podcast
.unsubscribe_id
,
28 name
='unsubscribe-id'),
30 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/unsubscribe/\+all$',
31 podcast
.unsubscribe_all_id
,
32 name
='unsubscribe-all-id'),
34 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/add-tag',
38 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/remove-tag',
39 podcast
.remove_tag_id
,
40 name
='remove-tag-id'),
42 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/set-public',
43 podcast
.set_public_id
,
44 name
='podcast-public-id',
45 kwargs
={'public': True}),
47 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/set-private',
48 podcast
.set_public_id
,
49 name
='podcast-private-id',
50 kwargs
={'public': False}),
52 url(r
'^podcast/(?P<podcast_id>[0-9a-f]{32})/-episodes',
53 podcast
.all_episodes_id
,
54 name
='podcast-all-episodes-id'),
56 # Podcast Views with Slugs
57 url(r
'^podcast/(?P<slug>[\w-]+)/?$',
61 url(r
'^podcast/(?P<slug>[\w-]+)/subscribe$',
62 podcast
.subscribe_slug
,
63 name
='subscribe-slug'),
65 url(r
'^podcast/(?P<slug>[\w-]+)/subscribe/\+all$',
66 podcast
.subscribe_all_slug
,
67 name
='subscribe-all-slug'),
69 url(r
'^podcast/(?P<slug>[\w-]+)/unsubscribe/(?P<device_uid>[\w.-]+)',
70 podcast
.unsubscribe_slug
,
71 name
='unsubscribe-slug'),
73 url(r
'^podcast/(?P<slug>[\w-]+)/unsubscribe/\+all$',
74 podcast
.unsubscribe_all_slug
,
75 name
='unsubscribe-all-slug'),
77 url(r
'^podcast/(?P<slug>[\w-]+)/add-tag',
81 url(r
'^podcast/(?P<slug>[\w-]+)/remove-tag',
82 podcast
.remove_tag_slug
,
83 name
='remove-tag-slug'),
85 url(r
'^podcast/(?P<slug>[\w-]+)/set-public',
86 podcast
.set_public_slug
,
87 name
='podcast-public-slug',
88 kwargs
={'public': True}),
90 url(r
'^podcast/(?P<slug>[\w-]+)/set-private',
91 podcast
.set_public_slug
,
92 name
='podcast-private-slug',
93 kwargs
={'public': False}),
95 url(r
'^podcast/(?P<slug>[\w-]+)/-episodes',
96 podcast
.all_episodes_slug
,
97 name
='podcast-all-episodes-slug'),
100 episode
.list_favorites
,
104 url(r
'^podcast/(?P<p_id>[0-9a-f]{32})/(?P<e_id>[0-9a-f]{32})$',
108 url(r
'^podcast/(?P<p_id>[0-9a-f]{32})/(?P<e_id>[0-9a-f]{32})/'
110 episode
.toggle_favorite_id
,
111 name
='episode-fav-id'),
113 url(r
'^podcast/(?P<p_id>[0-9a-f]{32})/(?P<e_id>[0-9a-f]{32})/add-action',
114 episode
.add_action_id
,
115 name
='add-episode-action-id'),
117 url(r
'^podcast/(?P<p_id>[0-9a-f]{32})/(?P<e_id>[0-9a-f]{32})/\+history',
118 episode
.episode_history_id
,
119 name
='episode-history-id'),
122 url(r
'^podcast/(?P<p_slug>[\w-]+)/(?P<e_slug>[\w-]+)$',
124 name
='episode-slug'),
126 url(r
'^podcast/(?P<p_slug>[\w-]+)/(?P<e_slug>[\w-]+)/toggle-favorite',
127 episode
.toggle_favorite_slug
,
128 name
='episode-fav-slug'),
130 url(r
'^podcast/(?P<p_slug>[\w-]+)/(?P<e_slug>[\w-]+)/add-action',
131 episode
.add_action_slug
,
132 name
='add-episode-action-slug'),
134 url(r
'^podcast/(?P<p_slug>[\w-]+)/(?P<e_slug>[\w-]+)/\+history',
135 episode
.episode_history_slug
,
136 name
='episode-history-slug'),