1 from django
.shortcuts
import render
2 from django
.contrib
.sites
.models
import RequestSite
3 from django
.http
import Http404
5 from mygpo
.userfeeds
.auth
import require_token_auth
6 from mygpo
.userfeeds
.feeds
import FavoriteFeed
7 from mygpo
.users
.models
import User
10 @require_token_auth('favorite_feeds_token')
11 def favorite_feed(request
, username
):
13 site
= RequestSite(request
)
15 user
= User
.get_user(username
)
19 feed
= FavoriteFeed(user
)
21 return render(request
, 'userfeed.xml', {
25 }, content_type
='text/xml')