You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kompass/jdav_web/members/models/activity.py

27 lines
1.0 KiB
Python

from django.db import models
from django.utils.translation import gettext_lazy as _
class ActivityCategory(models.Model):
"""
Describes one kind of activity
"""
LJP_CATEGORIES = [('Winter', _('winter')),
('Skibergsteigen', _('ski mountaineering')),
('Klettern', _('climbing')),
('Bergsteigen', _('mountaineering')),
('Theorie', _('theory')),
('Sonstiges', _('others'))]
name = models.CharField(max_length=20, verbose_name=_('Name'))
ljp_category = models.CharField(choices=LJP_CATEGORIES,
verbose_name=_('LJP category'),
max_length=20,
help_text=_('The official category for LJP applications associated with this activity.'))
description = models.TextField(_('Description'))
class Meta:
verbose_name = _('Activity')
verbose_name_plural = _('Activities')
def __str__(self):
return self.name