示例#1
0
文件: views.py 项目: ilwoof/makahiki
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))
示例#2
0
文件: views.py 项目: ilwoof/makahiki
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))