forked from DGNum/gestioCOF
buy more than one place
This commit is contained in:
parent
0282f62886
commit
2a56f8e255
2 changed files with 24 additions and 13 deletions
|
@ -44,6 +44,14 @@ class AttributionModelMultipleChoiceField(forms.ModelMultipleChoiceField):
|
|||
return "%s" % obj.spectacle
|
||||
|
||||
|
||||
class BuyResellForm(forms.Form):
|
||||
num = forms.ChoiceField(choices=[])
|
||||
|
||||
def __init__(self, spectacle, *args, **kwargs):
|
||||
super(BuyResellForm, self).__init__(*args, **kwargs)
|
||||
self.fields['num'].choices = range(1, spectacle.revente.count())
|
||||
|
||||
|
||||
class ResellForm(forms.Form):
|
||||
attributions = AttributionModelMultipleChoiceField(
|
||||
queryset=Attribution.objects.none(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue