diff --git a/account/admin.py b/account/admin.py index d6e28b4..bb74f79 100644 --- a/account/admin.py +++ b/account/admin.py @@ -35,7 +35,7 @@ class Meta: class MailingListAdmin(DisableDeleteAdminMixin, DisableAddAdminMixin, admin.ModelAdmin): - list_display = ("result", "csv_emails") + list_display = ("result", "number_of_emails") readonly_fields = ("result",) form = MailingListAdminForm diff --git a/account/models.py b/account/models.py index 5a7d3ef..fc994b3 100644 --- a/account/models.py +++ b/account/models.py @@ -72,6 +72,9 @@ def __str__(self): def csv_emails(self): return ",".join([e.email for e in self.emails.all()]) + def number_of_emails(self): + return self.emails.count() + class MailingListEmail(models.Model): email = models.EmailField()