fix pep8 + move template

This commit is contained in:
Ludovic Stephan 2017-02-21 19:49:29 -03:00
parent d96f4ead87
commit 42a93027d3
3 changed files with 7 additions and 5 deletions

View file

@ -91,7 +91,9 @@ class SoldForm(forms.Form):
def __init__(self, participant, *args, **kwargs):
super(SoldForm, self).__init__(*args, **kwargs)
self.fields['attributions'].queryset = participant.attribution_set\
self.fields['attributions'].queryset = (
participant.attribution_set
.filter(revente__isnull=False,
revente__soldTo__isnull=False)\
revente__soldTo__isnull=False)
.exclude(revente__soldTo=participant)
)

View file

@ -400,7 +400,7 @@ def revente(request, tirage_id):
.filter(
Q(revente__soldTo__isnull=True) | Q(revente__soldTo=participant))
return render(request, "bda-revente.html",
return render(request, "bda/reventes.html",
{'tirage': tirage, 'overdue': overdue, "soldform": soldform,
"annulform": annulform, "resellform": resellform})