diff options
author | Magnus Hagander | 2019-04-05 13:58:48 +0000 |
---|---|---|
committer | Magnus Hagander | 2019-04-06 09:09:27 +0000 |
commit | 5bb043c41e1d2ee2d1d026b8ecd5cc81058c59f3 (patch) | |
tree | 5859f34d249df21665042d8c11f3675acf1ab551 /postgresqleu/mailqueue/models.py | |
parent | 05aedf5fcb4ac85bd84378a468baad2413d552ca (diff) |
Make the mail queue managable through the backend interface
This adds a viewer and editor for the mailqueue to the dashboard,
superuser only.
While at it, expose time and subject directly in the queue to make it
easier to determine what is what.
Most of the time this is not going to matter because emails are
short-lived in the queue. But during development and definitely during
debugging, it can be quite useful.
Move the "parsed mail view" out of django admin and into the backend
view so we don't have to maintain it twice. There is very little use for
the admin view anymore, so it's OK to just show the raw data there.
Diffstat (limited to 'postgresqleu/mailqueue/models.py')
-rw-r--r-- | postgresqleu/mailqueue/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/postgresqleu/mailqueue/models.py b/postgresqleu/mailqueue/models.py index 6b002e7e..210bdeac 100644 --- a/postgresqleu/mailqueue/models.py +++ b/postgresqleu/mailqueue/models.py @@ -7,6 +7,8 @@ class QueuedMail(models.Model): # We store the raw MIME message, so if there are any attachments or # anything, we just push them right in there! fullmsg = models.TextField(null=False, blank=False) + sendtime = models.DateTimeField(null=False, blank=False, auto_now_add=True) + subject = models.CharField(max_length=500, null=False, blank=False) def __str__(self): return "%s: %s -> %s" % (self.pk, self.sender, self.receiver) |