also return outdated podcasts in PodcastUpdater.update()
[mygpo.git] / mygpo / userfeeds / views.py
blobf6170ebbe57bf6261cd72ffd94fbb05a542f294d
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)
16 if not user:
17 raise Http404
19 feed = FavoriteFeed(user)
21 return render(request, 'userfeed.xml', {
22 'site': site,
23 'feed_user': user,
24 'feed': feed,
25 }, content_type='text/xml')