suppression fonctions inutiles

This commit is contained in:
ludo 2016-06-24 16:52:21 +02:00
parent 929e70f5d3
commit 8e8c9a173a
2 changed files with 0 additions and 45 deletions

View file

@ -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'

View file

@ -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;