SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 21d3bcdc authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Add datestamps to maillogs

parent e4de8f0c
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-05-02 16:07
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('mails', '0002_auto_20180313_1744'),
]
operations = [
migrations.AddField(
model_name='maillog',
name='created',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='maillog',
name='latest_activity',
field=models.DateTimeField(auto_now=True),
),
]
...@@ -29,6 +29,9 @@ class MailLog(models.Model): ...@@ -29,6 +29,9 @@ class MailLog(models.Model):
from_email = models.CharField(max_length=254, blank=True) from_email = models.CharField(max_length=254, blank=True)
subject = models.CharField(max_length=254, blank=True) subject = models.CharField(max_length=254, blank=True)
created = models.DateTimeField(auto_now_add=True)
latest_activity = models.DateTimeField(auto_now=True)
objects = MailLogQuerySet.as_manager() objects = MailLogQuerySet.as_manager()
def __str__(self): def __str__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment