mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-06 23:05:42 +01:00
Sort senders by name
This commit is contained in:
parent
d89349f272
commit
57bae9969b
1 changed files with 3 additions and 0 deletions
|
|
@ -11,6 +11,9 @@ class Sender(models.Model):
|
|||
name = models.CharField(max_length=128, unique=True)
|
||||
slug = models.SlugField()
|
||||
|
||||
class Meta(object):
|
||||
ordering = ("name",)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.slug:
|
||||
self.slug = slugify(self.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue