mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-27 02:43:01 +00:00
add simple docstrings
This commit is contained in:
parent
4a52272558
commit
13d67c26bf
@ -8,6 +8,9 @@ from django.utils.translation import gettext_lazy as _
|
|||||||
|
|
||||||
|
|
||||||
class ActivityType(models.Model):
|
class ActivityType(models.Model):
|
||||||
|
"""
|
||||||
|
Type of Activity, (e.g "Pot", "Soirée Club") and associated properties
|
||||||
|
"""
|
||||||
name = models.CharField(
|
name = models.CharField(
|
||||||
verbose_name=_('name'),
|
verbose_name=_('name'),
|
||||||
max_length=255,
|
max_length=255,
|
||||||
@ -28,6 +31,9 @@ class ActivityType(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class Activity(models.Model):
|
class Activity(models.Model):
|
||||||
|
"""
|
||||||
|
An IRL event organized by a club for others.
|
||||||
|
"""
|
||||||
name = models.CharField(
|
name = models.CharField(
|
||||||
verbose_name=_('name'),
|
verbose_name=_('name'),
|
||||||
max_length=255,
|
max_length=255,
|
||||||
@ -66,6 +72,9 @@ class Activity(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class Guest(models.Model):
|
class Guest(models.Model):
|
||||||
|
"""
|
||||||
|
People who are not current members of any clubs, and invited by someone who is a current member.
|
||||||
|
"""
|
||||||
activity = models.ForeignKey(
|
activity = models.ForeignKey(
|
||||||
Activity,
|
Activity,
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
|
@ -9,6 +9,9 @@ from django import forms
|
|||||||
from .models import Profile
|
from .models import Profile
|
||||||
|
|
||||||
class ProfileForm(forms.ModelForm):
|
class ProfileForm(forms.ModelForm):
|
||||||
|
"""
|
||||||
|
Forms pour la création d'un profile utilisateur.
|
||||||
|
"""
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Profile
|
model = Profile
|
||||||
fields = '__all__'
|
fields = '__all__'
|
||||||
|
@ -110,6 +110,9 @@ class Role(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class Membership(models.Model):
|
class Membership(models.Model):
|
||||||
|
"""
|
||||||
|
Register the membership of a user to a club, including roles and membership duration.
|
||||||
|
"""
|
||||||
user = models.ForeignKey(
|
user = models.ForeignKey(
|
||||||
settings.AUTH_USER_MODEL,
|
settings.AUTH_USER_MODEL,
|
||||||
on_delete=models.PROTECT
|
on_delete=models.PROTECT
|
||||||
|
Loading…
Reference in New Issue
Block a user