1 from django
.conf
.urls
import *
3 from mygpo
.share
.views
import ShareFavorites
, FavoritesPublic
, \
4 PublicSubscriptions
, FavoritesFeedCreateEntry
5 from mygpo
.share
.userpage
import UserpageView
8 urlpatterns
= patterns('mygpo.share.views',
10 'overview', name
='share'),
11 url(r
'^share/subscriptions-public$',
13 {'public': True, 'token_name': 'subscriptions_token'},
14 name
='subscriptions-public'),
15 url(r
'^share/subscriptions-private$',
17 {'public': False, 'token_name': 'subscriptions_token'},
18 name
='subscriptions-private'),
19 url(r
'^share/favfeed-public$',
21 {'public': True, 'token_name': 'favorite_feeds_token'},
22 name
='favfeed-public'),
23 url(r
'^share/favfeed-private$',
25 {'public': False, 'token_name': 'favorite_feeds_token'},
26 name
='favfeed-private'),
27 url(r
'^share/userpage-public$',
29 {'public': True, 'token_name': 'userpage_token'},
30 name
='userpage-public'),
31 url(r
'^share/userpage-private$',
33 {'public': False, 'token_name': 'userpage_token'},
34 name
='userpage-private'),
35 url(r
'^share/lists/$',
36 'lists_own', name
='lists-overview'),
37 url(r
'^share/lists/create$',
38 'create_list', name
='list-create'),
39 url(r
'^user/(?P<username>[\w.-]+)/lists/$',
40 'lists_user', name
='lists-user'),
41 url(r
'^user/(?P<username>[\w.-]+)/list/(?P<listname>[\w-]+)$',
42 'list_show', name
='list-show'),
43 url(r
'^user/(?P<username>[\w.-]+)/list/(?P<listname>[\w-]+)\.opml$',
44 'list_opml', name
='list-opml'),
45 url(r
'^user/(?P<username>[\w.-]+)/list/(?P<listname>[\w-]+)/search$',
46 'search', name
='list-search'),
47 url(r
'^user/(?P<username>[\w.-]+)/list/(?P<listname>[\w-]+)/add/(?P<podcast_id>\w+)$',
48 'add_podcast', name
='list-add-podcast'),
49 url(r
'^user/(?P<username>[\w.-]+)/list/(?P<listname>[\w-]+)/remove/(?P<podcast_id>\w+)$',
50 'remove_podcast', name
='list-remove-podcast'),
51 url(r
'^user/(?P<username>[\w.-]+)/list/(?P<listname>[\w-]+)/delete$',
52 'delete_list', name
='list-delete'),
53 url(r
'^user/(?P<username>[\w.-]+)/list/(?P<listname>[\w-]+)/rate$',
54 'rate_list', name
='list-rate'),
57 url(r
'^share/favorites$',
58 ShareFavorites
.as_view(),
59 name
='share-favorites',
62 url(r
'^favorites/private',
63 FavoritesPublic
.as_view(public
=False),
64 name
='favorites_private'),
66 url(r
'^favorites/public',
67 FavoritesPublic
.as_view(public
=True),
68 name
='favorites_public'),
70 url(r
'^share/subscriptions/private',
71 PublicSubscriptions
.as_view(public
=False),
72 name
='private_subscriptions'),
74 url(r
'^share/subscriptions/public',
75 PublicSubscriptions
.as_view(public
=True),
76 name
='public_subscriptions'),
78 url(r
'^share/favorites/create-directory-entry',
79 FavoritesFeedCreateEntry
.as_view(),
80 name
='favorites-create-entry'),
84 urlpatterns
+= patterns('mygpo.share.userpage',
85 url(r
'^user/(?P<username>[\w.-]+)/?$', UserpageView
.as_view(), name
='user'),