summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--welco/sources/mail/migrations/0011_mail_reference.py5
-rw-r--r--welco/sources/mail/models.py1
2 files changed, 6 insertions, 0 deletions
diff --git a/welco/sources/mail/migrations/0011_mail_reference.py b/welco/sources/mail/migrations/0011_mail_reference.py
index eaf5414..30bfd7d 100644
--- a/welco/sources/mail/migrations/0011_mail_reference.py
+++ b/welco/sources/mail/migrations/0011_mail_reference.py
@@ -16,4 +16,9 @@ class Migration(migrations.Migration):
name='reference',
field=models.CharField(max_length=30, null=True, verbose_name='Reference'),
),
+ migrations.AlterModelOptions(
+ name='mail',
+ options={'ordering': ['creation_timestamp', 'post_date'],
+ 'verbose_name': 'Mail'},
+ ),
]
diff --git a/welco/sources/mail/models.py b/welco/sources/mail/models.py
index c5bb596..c5f0ef1 100644
--- a/welco/sources/mail/models.py
+++ b/welco/sources/mail/models.py
@@ -35,6 +35,7 @@ class Mail(models.Model):
class Meta:
verbose_name = _('Mail')
+ ordering = ['creation_timestamp', 'post_date']
content = models.FileField(_('Content'))
post_date = models.DateField(_('Post Date'), null=True)