blob: cd2128d9db0a8efe43fe89ee6f9f462bde2eeb01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
from django import forms
from django.forms.utils import ValidationError
from .models import LuxOptionContract
class LuxOptionsForm(forms.ModelForm):
contracts = forms.IntegerField()
class Meta:
model = LuxOptionContract
fields = [
'symbol',
'strike_price',
'expiration_date',
'contract_open_price',
'call_put',
'contracts'
]
class LuxOptionsUpdateForm(forms.ModelForm):
contracts_to_close = forms.IntegerField()
class Meta:
model = LuxOptionContract
fields = [
'symbol',
'strike_price',
'expiration_date',
'contracts_to_close',
'contract_close_price',
]
|