def download(request): query1 = FlashCard.all() query2 = Note.all() query3 = Reference.all() xmlcards = [card.to_xml() for card in query1.run()] xmlnotes = [note.to_xml() for note in query2.run()] xmlrefs = [ref.to_xml() for ref in query3.run()] return render_to_response('download.xml', { 'xmlcards': xmlcards, 'xmlnotes': xmlnotes, 'xmlrefs': xmlrefs })
def books(request): query = Reference.all() imgIDs = [ref.pic.key() for ref in query.run() if ref.pic is not None] return render_to_response('library.html', {'images': imgIDs})