fix pep8 + move template
This commit is contained in:
parent
d96f4ead87
commit
42a93027d3
3 changed files with 7 additions and 5 deletions
|
@ -91,7 +91,9 @@ class SoldForm(forms.Form):
|
||||||
|
|
||||||
def __init__(self, participant, *args, **kwargs):
|
def __init__(self, participant, *args, **kwargs):
|
||||||
super(SoldForm, self).__init__(*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,
|
.filter(revente__isnull=False,
|
||||||
revente__soldTo__isnull=False)\
|
revente__soldTo__isnull=False)
|
||||||
.exclude(revente__soldTo=participant)
|
.exclude(revente__soldTo=participant)
|
||||||
|
)
|
||||||
|
|
|
@ -400,7 +400,7 @@ def revente(request, tirage_id):
|
||||||
.filter(
|
.filter(
|
||||||
Q(revente__soldTo__isnull=True) | Q(revente__soldTo=participant))
|
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,
|
{'tirage': tirage, 'overdue': overdue, "soldform": soldform,
|
||||||
"annulform": annulform, "resellform": resellform})
|
"annulform": annulform, "resellform": resellform})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue