forked from DGNum/gestioCOF
Nettoyage du code
This commit is contained in:
parent
ad145ec70f
commit
366daf7240
1 changed files with 12 additions and 8 deletions
20
bda/views.py
20
bda/views.py
|
@ -25,14 +25,18 @@ from bda.forms import BaseBdaFormSet, TokenForm, ResellForm
|
|||
@cof_required
|
||||
def etat_places(request, tirage_id):
|
||||
tirage = get_object_or_404(Tirage, id=tirage_id)
|
||||
spectacles1 = ChoixSpectacle.objects.filter(spectacle__tirage=tirage
|
||||
).filter(double_choice="1"
|
||||
).all().values('spectacle','spectacle__title'
|
||||
).annotate(total=models.Count('spectacle'))
|
||||
spectacles2 = ChoixSpectacle.objects.filter(spectacle__tirage=tirage
|
||||
).exclude(double_choice="1"
|
||||
).all().values('spectacle','spectacle__title'
|
||||
).annotate(total=models.Count('spectacle'))
|
||||
spectacles1 = ChoixSpectacle.objects \
|
||||
.filter(spectacle__tirage=tirage) \
|
||||
.filter(double_choice="1") \
|
||||
.all() \
|
||||
.values('spectacle','spectacle__title') \
|
||||
.annotate(total=models.Count('spectacle'))
|
||||
spectacles2 = ChoixSpectacle.objects \
|
||||
.filter(spectacle__tirage=tirage) \
|
||||
.exclude(double_choice="1") \
|
||||
.all() \
|
||||
.values('spectacle','spectacle__title') \
|
||||
.annotate(total=models.Count('spectacle'))
|
||||
spectacles = Spectacle.objects.filter(tirage=tirage).all()
|
||||
spectacles_dict = {}
|
||||
total = 0
|
||||
|
|
Loading…
Reference in a new issue