diff --git a/apps/member/models.py b/apps/member/models.py index b4b9b957..20f50591 100644 --- a/apps/member/models.py +++ b/apps/member/models.py @@ -92,6 +92,28 @@ class Profile(models.Model): default=False, ) + ml_events_registration = models.BooleanField( + blank=True, + null=True, + default=None, + choices=[ + (None, _("No")), + ('fr', _("Yes (receive them in french)")), + ('en', _("Yes (receive them in english)")), + ], + verbose_name=_("Register on the mailing list to stay informed of the events of the campus (1 mail/week)"), + ) + + ml_sport_registration = models.BooleanField( + default=False, + verbose_name=_("Register on the mailing list to stay informed of the sport events of the campus (1 mail/week)"), + ) + + ml_art_registration = models.BooleanField( + default=False, + verbose_name=_("Register on the mailing list to stay informed of the art events of the campus (1 mail/week)"), + ) + report_frequency = models.PositiveSmallIntegerField( verbose_name=_("report frequency (in days)"), default=0, diff --git a/apps/wei/management/commands/extract_ml_registrations.py b/apps/wei/management/commands/extract_ml_registrations.py index b67bf10b..6d48093e 100644 --- a/apps/wei/management/commands/extract_ml_registrations.py +++ b/apps/wei/management/commands/extract_ml_registrations.py @@ -5,6 +5,7 @@ from datetime import date from django.core.management import BaseCommand from django.db.models import Q + from member.models import Membership, Club from wei.models import WEIClub @@ -21,6 +22,13 @@ class Command(BaseCommand): help='Select the year of the concerned WEI. Default: last year') def handle(self, *args, **options): + ########################################################### + # WARNING # + ########################################################### + # + # This code is obsolete. + # TODO: Improve the mailing list extraction system, and link it automatically with Mailman. + if options["type"] == "members": for membership in Membership.objects.filter( club__name="BDE", diff --git a/apps/wei/models.py b/apps/wei/models.py index b72208ed..46d9383f 100644 --- a/apps/wei/models.py +++ b/apps/wei/models.py @@ -229,21 +229,6 @@ class WEIRegistration(models.Model): verbose_name=_("emergency contact phone"), ) - ml_events_registration = models.BooleanField( - default=False, - verbose_name=_("Register on the mailing list to stay informed of the events of the campus (1 mail/week)"), - ) - - ml_sport_registration = models.BooleanField( - default=False, - verbose_name=_("Register on the mailing list to stay informed of the sport events of the campus (1 mail/week)"), - ) - - ml_art_registration = models.BooleanField( - default=False, - verbose_name=_("Register on the mailing list to stay informed of the art events of the campus (1 mail/week)"), - ) - first_year = models.BooleanField( default=False, verbose_name=_("first year"), diff --git a/apps/wei/templates/wei/weimembership_form.html b/apps/wei/templates/wei/weimembership_form.html index 1fc4e43c..9a1a4d97 100644 --- a/apps/wei/templates/wei/weimembership_form.html +++ b/apps/wei/templates/wei/weimembership_form.html @@ -77,15 +77,6 @@