mail: add default order, by postal or creation date (#14824)

This commit is contained in:
Thomas NOËL 2017-01-30 17:09:58 +01:00
parent a6ec6eb908
commit 44d4464ac5
2 changed files with 6 additions and 0 deletions

View File

@ -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'},
),
]

View File

@ -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)