migrate + doc to models.py
This commit is contained in:
parent
a50e60bcbf
commit
406f67bd72
|
@ -8,6 +8,14 @@ from phonenumber_field.modelfields import PhoneNumberField
|
|||
from django.core.exceptions import ValidationError
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# MODELS
|
||||
|
||||
# Warning :
|
||||
# If you modify a Model sub-class attribute, you
|
||||
# should then run :
|
||||
# ./manage.py makemigrations
|
||||
# ./manage.py migrate
|
||||
|
||||
def validate_positive(value):
|
||||
if value < 0:
|
||||
raise ValidationError(
|
||||
|
@ -145,6 +153,8 @@ class SailsOn(Model):
|
|||
is_guest = BooleanField()
|
||||
is_pet = BooleanField()
|
||||
|
||||
present = BooleanField(default=True)
|
||||
|
||||
class BoatInsurance(Model):
|
||||
contract = IntegerField(blank=True,null=True)
|
||||
date = DateTimeField(auto_now_add=True)
|
||||
|
|
Loading…
Reference in New Issue