Пример #1
0
def torrent(request, t_id):
    torrent = get_object_or_404(torrents, pk=t_id)
    try:
        fetcher = fetchers.get_object(pk=torrent.id)
    except fetchers.FetcherDoesNotExist:
        fetcher = None
    msgs = messages.get_list(order_by=['-logged'], limit=30, torrent__id__exact=torrent.id)
    return render_to_response('aurora/torrent', {
            'torrent': torrent,
            'fetcher': fetcher,
            'aurora_messages': msgs,
        })
Пример #2
0
def index(request):
    return render_to_response('aurora/index', {
            'torrents': torrents.get_list(order_by=['-created']),
            'fetchers': fetchers.get_list(),
            'aurora_messages': messages.get_list(order_by=['-logged'], limit=7),
        })