Add category to role model

This commit is contained in:
Jan Tuomi
2017-10-16 12:42:12 +03:00
parent 4074b6d931
commit c5ad46c411
8 changed files with 236 additions and 71 deletions
+18
View File
@@ -90,8 +90,26 @@ class Registration(models.Model):
class BaseRole(models.Model):
"""Base model for occupations/roles."""
CATEGORIES = (
('corporate', _('Corporate affairs')),
('freshman', _('Freshmen')),
('international', _('International')),
('external', _('External affairs')),
('media', _('Media')),
('tech', _('Technology')),
('wellbeing', _('Wellbeing')),
('elepaja', _('Elepaja')),
('ceremonies', _('Ceremonies')),
('culture', _('Culture')),
('studies', _('Studies')),
('sosso', _('Sössö magazine')),
('alumni', _('Alumni relations')),
('others', _('Others')),
)
name = models.CharField(_('Name'), max_length=255)
is_board = models.BooleanField(_('Board member'))
category = models.CharField(_('Category'), choices=CATEGORIES, default='others', max_length=255)
def __str__(self):
n = self.name.capitalize()