Unverified Commit 38aae6f9 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Add fields to committees

See #11
parent 78f2f657
......@@ -12,9 +12,18 @@ from members.models import Member
logger = logging.getLogger(__name__)
class ActiveCommitteesManager(models.Manager):
"""Returns active committees only"""
def get_queryset(self):
return super().get_queryset().exclude(until__lt=timezone.now().date())
class Committee(models.Model):
"""A committee"""
active_committees = ActiveCommitteesManager()
objects = models.Manager()
name = models.CharField(
verbose_name=_('Committee name'),
......@@ -40,6 +49,12 @@ class Committee(models.Model):
since = models.DateField(_('founded in'))
until = models.DateField(_('existed until'))
contact_email = models.EmailField(_('contact email address'))
def __str__(self):
return self.name
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment