max
This commit is contained in:
parent
ecc7552c20
commit
addd0af7e8
|
@ -125,5 +125,16 @@ class TapForm(Form):
|
|||
|
||||
TapFormSet = formset_factory(TapForm)
|
||||
|
||||
class BoatForm(Form):
|
||||
class BoatForm(ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = Boat
|
||||
fields = ['name',
|
||||
'length', 'beam',
|
||||
'water_draught',
|
||||
'tonnage',
|
||||
'water_tank',
|
||||
'model',
|
||||
'heating',
|
||||
'passenger_capacity',
|
||||
'picture']
|
||||
|
|
|
@ -45,12 +45,12 @@ class Insurance(Company):
|
|||
|
||||
class Boat(Model):
|
||||
name = CharField(max_length=50)
|
||||
registration_num = CharField(max_length=20,null=True)
|
||||
length = DecimalField(max_digits=7, decimal_places=2, null=True)
|
||||
beam = DecimalField(max_digits=7, decimal_places=2, null=True)
|
||||
registration_num = CharField('Registration number', max_length=20,null=True)
|
||||
length = DecimalField('Length', max_digits=7, decimal_places=2, null=True)
|
||||
beam = DecimalField(, max_digits=7, decimal_places=2, null=True)
|
||||
water_draught = DecimalField(max_digits=7, decimal_places=2, null=True)
|
||||
tonnage = DecimalField(max_digits=7, decimal_places=2, null=True)
|
||||
water_tank = DecimalField(max_digits=7, decimal_places=2, null=True)
|
||||
water_tank = DecimalField('Water tank capacity', max_digits=7, decimal_places=2, null=True)
|
||||
model = CharField(max_length=50,null=True)
|
||||
heating = CharField(max_length=50,null=True)
|
||||
passenger_capacity = IntegerField(null=True)
|
||||
|
|
Loading…
Reference in New Issue