mail: add default order, by postal or creation date (#14824)
This commit is contained in:
parent
a6ec6eb908
commit
44d4464ac5
|
@ -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'},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue