From 8e8c9a173a1721177fe3067948b57687fa280974 Mon Sep 17 00:00:00 2001 From: ludo Date: Fri, 24 Jun 2016 16:52:21 +0200 Subject: [PATCH] suppression fonctions inutiles --- bda/views.py | 40 ----------------------------------- gestioncof/static/css/cof.css | 5 ----- 2 files changed, 45 deletions(-) diff --git a/bda/views.py b/bda/views.py index a7acc127..d72a0a10 100644 --- a/bda/views.py +++ b/bda/views.py @@ -320,46 +320,6 @@ def spectacle(request, tirage_id, spectacle_id): return render(request, "bda-participants.html", {"spectacle": spectacle, "participants": participants_info}) -@buro_required -@require_POST -def add_attrib(request, tirage_id, spectacle_id): - tirage = get_object_or_404(Tirage, id=tirage_id) - spectacle = get_object_or_404(Spectacle, id=spectacle_id, tirage=tirage) - try: - part=tirage.participant_set.get(user__username=request.POST['username']) - except Participant.DoesNotExist: - messages.add_message(request, messages.ERROR, - u"Erreur : utilisateur %s non trouvé" % request.POST['username']) - return HttpResponseRedirect(reverse('bda-spectacle', - args=(tirage_id, spectacle_id,))) - - attrib = Attribution(participant=part, spectacle=spectacle, - given=('given' in request.POST)) - attrib.save() - if int(request.POST['nb_places'])==2: - attrib2 = Attribution(participant=part, spectacle=spectacle, - given=('given' in request.POST)) - attrib2.save() - - messages.add_message(request, messages.SUCCESS, - "Attribution réussie !") - return HttpResponseRedirect(reverse('bda-spectacle', - args=(tirage_id, spectacle_id,))) - -@buro_required -@require_POST -def del_attrib(request, tirage_id, spectacle_id): - tirage = get_object_or_404(Tirage, id=tirage_id) - spectacle = get_object_or_404(Spectacle, id=spectacle_id, tirage=tirage) - part = tirage.participant_set.get(user__username=request.POST['username']) - spectacle.attribues.filter(participant=part).delete() - - - messages.add_message(request, messages.SUCCESS, - "Attribution(s) supprimée(s) !") - return HttpResponseRedirect(reverse('bda-spectacle', - args=(tirage_id, spectacle_id,))) - class SpectacleListView(ListView): model = Spectacle template_name = 'spectacle_list.html' diff --git a/gestioncof/static/css/cof.css b/gestioncof/static/css/cof.css index ed7363c9..d59e6ded 100644 --- a/gestioncof/static/css/cof.css +++ b/gestioncof/static/css/cof.css @@ -601,11 +601,6 @@ pre code { .etat-bda tr:nth-child(even) {background: #CCC} -#bda-part-button { - border:none; - background-color:#eee -} - .greenratio { background-color: #3F3; border: 5px solid #ccc;