def raffle(request): floor = request.user.get_profile().floor prizes = _get_prizes(floor) raffle_dict = _get_raffle_prizes(request.user) return render_to_response("mobile/raffle/index.html", { "prizes": prizes, "raffle": raffle_dict, }, context_instance=RequestContext(request))
def raffle_item(request, prize_slug): floor = request.user.get_profile().floor prizes = _get_prizes(floor) raffle_dict = _get_raffle_prizes(request.user) # prize = "" # for i in prizes: # if prize_slug == slugify(i.title): # prize = i return render_to_response("mobile/raffle/item.html", { "slug":prize_slug, "prizes":prizes, "raffle": raffle_dict, }, context_instance=RequestContext(request))