Exemplo n.º 1
0
Arquivo: views.py Projeto: fk-lx/mygpo
def list_show(request, plist, owner):

    is_own = owner == request.user
    site = RequestSite(request)

    plist = proxy_object(plist)

    podcasts = list(podcasts_groups_by_id(plist.podcasts))
    plist.podcasts = podcasts

    max_subscribers = max([p.subscriber_count() for p in podcasts] + [0])

    thing = plist.get_flattr_thing(site.domain, owner.username)
    flattr = Flattr(owner, site.domain, request.is_secure())
    flattr_autosubmit = flattr.get_autosubmit_url(thing)

    return render(request, 'list.html', {
            'podcastlist': plist,
            'max_subscribers': max_subscribers,
            'owner': owner,
            'flattr_autosubmit': flattr_autosubmit,
            'domain': site.domain,
            'is_own': is_own,
        })
Exemplo n.º 2
0
Arquivo: views.py Projeto: fk-lx/mygpo
def list_opml(request, plist, owner):
    podcasts = podcasts_groups_by_id(plist.podcasts)
    return format_podcast_list(podcasts, 'opml', plist.title)