This commit is contained in:
root 2015-01-06 11:01:15 +01:00
parent 64b8ee4133
commit 182ba7f614
6 changed files with 31 additions and 34 deletions

View file

@ -47,7 +47,7 @@ def etat_places(request):
total = 0
for spectacle in spectacles:
spectacle.total = 0
spectacle.ratio = -1.0
spectacle.ratio = 0.0
spectacles_dict[spectacle.id] = spectacle
for spectacle in spectacles1:
spectacles_dict[spectacle["spectacle"]].total += spectacle["total"]
@ -96,10 +96,10 @@ def places(request):
@cof_required
def inscription(request):
if datetime.now() > datetime(2013, 10, 6, 23, 59):
if datetime.now() > datetime(2014, 10, 5, 12, 00):
participant, created = Participant.objects.get_or_create(user = request.user)
choices = participant.choixspectacle_set.order_by("priority").all()
return render(request, "resume_inscription.html", {"error_title": "C'est fini !", "error_description": u"Tirage au sort le 7 octobre !", "choices": choices})
return render(request, "resume_inscription.html", {"error_title": "C'est fini !", "error_description": u"Tirage au sort dans la journée !", "choices": choices})
BdaFormSet = inlineformset_factory(Participant, ChoixSpectacle, fields = ("spectacle","double","autoquit","priority",), formset = BaseBdaFormSet)
participant, created = Participant.objects.get_or_create(user = request.user)
success = False
@ -176,7 +176,7 @@ def do_tirage(request):
member.total += show.price
members2 = members2.items()
data["members2"] = sorted(members2, key = lambda m: m[0].user.last_name)
if False and request.user.username in ["seguin", "harazi"]:
if False and request.user.username in ["seguin", "harazi","fromherz"]:
Attribution.objects.all().delete()
for (show, members, _) in results:
for (member, _, _, _) in members: