From 587db018ea76878eb0f59fd77f921d89d6ce00df Mon Sep 17 00:00:00 2001 From: Carlos Vega <carlos.vega@uni.lu> Date: Wed, 10 Oct 2018 11:42:20 +0200 Subject: [PATCH] use constants in model --- smash/web/models/holiday.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smash/web/models/holiday.py b/smash/web/models/holiday.py index f18d5a37..927daa54 100644 --- a/smash/web/models/holiday.py +++ b/smash/web/models/holiday.py @@ -1,7 +1,7 @@ # coding=utf-8 from django.db import models -from constants import AVAILABILITY_CHOICES +from constants import AVAILABILITY_CHOICES, AVAILABILITY_HOLIDAY class Holiday(models.Model): class Meta: @@ -22,7 +22,7 @@ class Holiday(models.Model): verbose_name='Comments' ) - kind = models.CharField(max_length=1, choices=AVAILABILITY_CHOICES, default='H', help_text='Defines the kind of availability. Either Holiday or Extra Availability.') + kind = models.CharField(max_length=1, choices=AVAILABILITY_CHOICES, default=AVAILABILITY_HOLIDAY, help_text='Defines the kind of availability. Either Holiday or Extra Availability.') def __str__(self): return "%s %s" % (self.person.first_name, self.person.last_name) -- GitLab