Fix #406 -- Allow moving waiting list entries to the top or bottom

This commit is contained in:
Raphael Michel
2018-08-07 10:53:07 +02:00
parent 0100604798
commit 67897dfcc0
7 changed files with 124 additions and 23 deletions

View File

@@ -65,11 +65,12 @@ class WaitingListEntry(LoggedModel):
max_length=190,
default='en'
)
priority = models.IntegerField(default=0)
class Meta:
verbose_name = _("Waiting list entry")
verbose_name_plural = _("Waiting list entries")
ordering = ['created']
ordering = ('-priority', 'created')
def __str__(self):
return '%s waits for %s' % (str(self.email), str(self.item))