Order attachments by description
This commit is contained in:
parent
6c3ab47a9b
commit
99b2cd7e02
1 changed files with 3 additions and 0 deletions
|
@ -14,6 +14,9 @@ class Attachment(models.Model):
|
|||
original_file = models.FileField()
|
||||
processed_file = models.FileField(blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ["description"]
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.description} ({self.original_file.name})"
|
||||
|
||||
|
|
Reference in a new issue