Browse Source

Allow mail lists without subscribers

Jocelyn Delalande 6 years ago
parent
commit
900d5dfe08
2 changed files with 31 additions and 1 deletions
  1. 30 0
      maillists/migrations/0002_auto_20181106_1148.py
  2. 1 1
      maillists/models.py

+ 30 - 0
maillists/migrations/0002_auto_20181106_1148.py

@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+from django.conf import settings
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('maillists', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='maillinglist',
+            name='short_name',
+            field=models.CharField(help_text='c\'est l\'identifiant qui servira \xe0 communiquer avec le syst\xe8me de mailling-list(typiquement, la partie avant le "@" dans l\'adress )', max_length=50, verbose_name='identifiant technique'),
+        ),
+        migrations.AlterField(
+            model_name='maillinglist',
+            name='subscribers',
+            field=models.ManyToManyField(related_name='subscribed_maillinglists', verbose_name='abonn\xe9\xb7e\xb7s', to=settings.AUTH_USER_MODEL, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='maillinglist',
+            name='verbose_name',
+            field=models.CharField(help_text="Nom affich\xe9 dans l'interface membre", max_length=130, verbose_name='nom complet'),
+        ),
+    ]

+ 1 - 1
maillists/models.py

@@ -29,7 +29,7 @@ class MaillingList(models.Model):
     description = models.TextField()
     subscribers = models.ManyToManyField(
         Member, related_name='subscribed_maillinglists',
-        verbose_name='abonné·e·s')
+        verbose_name='abonné·e·s', blank=True)
 
     class Meta:
         verbose_name = 'liste mail'