Skip to content
Snippets Groups Projects
Commit 8d58cac6 authored by Carlos Vega's avatar Carlos Vega
Browse files

changed model to add different kinds of availabilities. Issue #241

parent 96fcdb3a
No related branches found
No related tags found
1 merge request!171Feature/daily availability
# coding=utf-8 # coding=utf-8
from django.db import models from django.db import models
from constants import AVAILABILITY_CHOICES
class Holiday(models.Model): class Holiday(models.Model):
class Meta: class Meta:
...@@ -21,6 +22,8 @@ class Holiday(models.Model): ...@@ -21,6 +22,8 @@ class Holiday(models.Model):
verbose_name='Comments' 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.')
def __str__(self): def __str__(self):
return "%s %s" % (self.person.first_name, self.person.last_name) return "%s %s" % (self.person.first_name, self.person.last_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment