def show_pgn_file(request, key): pgnfile = PGNFile.get(key) p = PGNReader(pgnfile.filecontent) b = Board() b.moves_from_list(p.moves_as_list()) nick = users.get_current_user().nickname() return render_to_response("pgnfile_detail.html", { "pgnfile": pgnfile, "white": p._white, "black": p._black, "moves": p.moves2str(p._moves), "board": str(b), "result": p._result, "login": nick })