def auction_list_index():
    return render_template(
        'list.html',
        documents=[auction.doc
                   for auction in endDate_view(auctions_server.db,
                                               endkey=time.time() * 1000,
                                               include_docs=True)
                   ]
    )
Exemplo n.º 2
0
def auction_list_index():
    return render_template(
        'list.html',
        documents=reversed([
            auction.doc
            for auction in endDate_view(auctions_server.db,
                                        startkey=time.time() * 1000,
                                        include_docs=True)
        ]))
def archive_tenders_list_index():
    return render_template(
        'list.html',
        documents=reversed(
            [auction.doc
             for auction in endDate_view(auctions_server.db,
                                         startkey=time.time() * 1000,
                                         include_docs=True)
             ])
    )
Exemplo n.º 4
0
def archive_auction_list_index():
    offset = int(request.args.get('offset', default=time.time() * 1000))
    startkey_docid = request.args.get('startid', default=None)
    documents = [
        auction for auction in endDate_view(auctions_server.db,
                                            startkey=offset,
                                            startkey_docid=startkey_docid,
                                            limit=101,
                                            descending=True,
                                            include_docs=True)
    ]
    if len(documents) > 100:
        offset, startid = documents[100].key, documents[100].id
    else:
        offset, startid = False, False
    return render_template('archive.html',
                           documents=documents[:-1],
                           offset=offset,
                           startid=startid)
def archive_auction_list_index():
    offset = int(request.args.get('offset', default=time.time() * 1000))
    startkey_docid = request.args.get('startid', default=None)
    documents=[auction
               for auction in endDate_view(auctions_server.db,
                                               startkey=offset,
                                               startkey_docid=startkey_docid,
                                               limit=101,
                                               descending=True,
                                               include_docs=True)
                   ]
    if len(documents)>100:
        offset, startid = documents[100].key, documents[100].id
    else:
        offset, startid = False, False
    return render_template(
        'archive.html',
        documents=documents[:-1],
        offset=offset,
        startid=startid
    )