def start_game(request): context = {} if request.POST: return HttpResponseBadRequest("Please do not post") else: context = get_dealer(request, context) hand = Hand() hand.add_card(C.generate_card()) hand.add_card(C.generate_card()) hand.save() context['player'].hand = hand context['player'].save() dealhand = Hand() dealhand.add_card(C.generate_card()) dealhand.save() context['dealer'].hand = dealhand context['dealer'].save() print context['dealer'].hand return HttpResponseRedirect('/game/playing')