FEAT: Add admin email notif when an account is activated and awaiting approval

No async or time-since shenanigans yet!
This commit is contained in:
2020-01-24 00:56:44 +00:00
parent 0da392563c
commit 806b8a3f00
6 changed files with 45 additions and 2 deletions

View File

@@ -54,6 +54,9 @@ class Profile(AbstractUser):
def latest_events(self):
return self.event_mic.order_by('-start_date').select_related('person', 'organisation', 'venue', 'mic')
def users_awaiting_approval_count(self):
return self.filter(models.Q(is_approved=False)).count()
def __str__(self):
return self.name