From 406f67bd723916de3b62902b312599922f3081f0 Mon Sep 17 00:00:00 2001 From: maxime Date: Sat, 22 Jun 2019 19:48:23 +0200 Subject: [PATCH] migrate + doc to models.py --- port/models.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/port/models.py b/port/models.py index 0fc065d..ceed1a3 100644 --- a/port/models.py +++ b/port/models.py @@ -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)