Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add default ordering to weight entries

Roland Geiderd6acda58c696
diff --git a/weight/models.py b/weight/models.py
index 31dd56c1d..be5c5d58a 100644
--- a/weight/models.py
+++ b/weight/models.py
@@ -25,6 +25,9 @@ class WeightEntry(models.Model):
weight = models.FloatField(_('Weight'))
user = models.ForeignKey(User, verbose_name = _('User'))
+ # Metaclass to set some other properties
+ class Meta:
+ ordering = ["creation_date", ]
def __unicode__(self):
"""Return a more human-readable representation