From 13d67c26bfbe1b5a25af48d922bb9d3ce2e23365 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Sun, 11 Aug 2019 17:52:41 +0200 Subject: [PATCH] add simple docstrings --- apps/activity/models.py | 9 +++++++++ apps/member/forms.py | 3 +++ apps/member/models.py | 3 +++ 3 files changed, 15 insertions(+) diff --git a/apps/activity/models.py b/apps/activity/models.py index 2cc81732..50a8d781 100644 --- a/apps/activity/models.py +++ b/apps/activity/models.py @@ -8,6 +8,9 @@ from django.utils.translation import gettext_lazy as _ class ActivityType(models.Model): + """ + Type of Activity, (e.g "Pot", "Soirée Club") and associated properties + """ name = models.CharField( verbose_name=_('name'), max_length=255, @@ -28,6 +31,9 @@ class ActivityType(models.Model): class Activity(models.Model): + """ + An IRL event organized by a club for others. + """ name = models.CharField( verbose_name=_('name'), max_length=255, @@ -66,6 +72,9 @@ class Activity(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, on_delete=models.PROTECT, diff --git a/apps/member/forms.py b/apps/member/forms.py index 748e7d09..9747afd0 100644 --- a/apps/member/forms.py +++ b/apps/member/forms.py @@ -9,6 +9,9 @@ from django import forms from .models import Profile class ProfileForm(forms.ModelForm): + """ + Forms pour la création d'un profile utilisateur. + """ class Meta: model = Profile fields = '__all__' diff --git a/apps/member/models.py b/apps/member/models.py index 87c5582b..d2fe75c2 100644 --- a/apps/member/models.py +++ b/apps/member/models.py @@ -110,6 +110,9 @@ class Role(models.Model): class Membership(models.Model): + """ + Register the membership of a user to a club, including roles and membership duration. + """ user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.PROTECT