1 from django
.urls
import reverse
3 from mygpo
.favorites
.models
import FavoriteEpisode
7 def __init__(self
, user
):
11 return "%s's Favorite Episodes" % self
.user
.username
13 def get_episodes(self
):
14 return FavoriteEpisode
.episodes_for_user(self
.user
)
18 If all of the feed's episodes have the same language, return it,
19 otherwise return an empty string
21 l
= list(set([x
.language
for x
in self
.get_episodes() if x
.language
]))
27 def get_public_url(self
, domain
):
28 return "http://%s%s" % (
30 reverse("favorites-feed", args
=[self
.user
.username
]),