projects
/
pgeu-website.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1752a22
)
Add a default ordering for volunteer slots
author
Magnus Hagander
<magnus@hagander.net>
Wed, 4 Oct 2017 09:06:26 +0000
(11:06 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Wed, 4 Oct 2017 09:06:26 +0000
(11:06 +0200)
Only used in the admin section, but important there...
postgresqleu/confreg/models.py
patch
|
blob
|
blame
|
history
diff --git
a/postgresqleu/confreg/models.py
b/postgresqleu/confreg/models.py
index 3cd986cdfcccab3aec2d8e9093e5b5941c9131df..d551c2b64339fc92947f3524114f27fbb41ac18f 100644
(file)
--- a/
postgresqleu/confreg/models.py
+++ b/
postgresqleu/confreg/models.py
@@
-683,6
+683,9
@@
class VolunteerSlot(models.Model):
min_staff = models.IntegerField(null=False, blank=False, default=1, validators=[MinValueValidator(1)])
max_staff = models.IntegerField(null=False, blank=False, default=1, validators=[MinValueValidator(1)])
+ class Meta:
+ ordering = [ 'timerange', ]
+
def __unicode__(self):
return "{0} - {1}".format(self.timerange.lower, self.timerange.upper)