Exemplo n.º 1
0
def joinable(request):
    # this is just a convienience for the pure HTML interface
    # @TODO: see if any browsers actually support url templates for forms
    if request.method == "POST":
        gameId = int(request.POST['gameId'])
        return join(request, gameId)
    else:
        return render_csrf('joinable.html', request,
        {
            'joinable': Game.findJoinableBy(request.user)
        })