Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Order diary entries by datetime

Roland Geider322c5e1f17fa
diff --git a/wger/nutrition/models.py b/wger/nutrition/models.py
index b299e53bf..0ffe7b65a 100644
--- a/wger/nutrition/models.py
+++ b/wger/nutrition/models.py
@@ -744,6 +744,10 @@ class LogItem(BaseMealItem, models.Model):
'''
An item (component) of a log
'''
+ # Metaclass to set some other properties
+ class Meta:
+ ordering = ["datetime", ]
+
plan = models.ForeignKey(NutritionPlan,
verbose_name=_('Nutrition plan'),
editable=False)