Admin interface for nutrition and training
[climbing.kerkeslager.com] / src / nutrition / models.py
index ba7d415..67ccd61 100644 (file)
@@ -1,6 +1,9 @@
 from django.db import models
 
 class Food(models.Model):
-    name = models.TextField(max_length=64)
-    brand = models.TextField(max_length=64)
+    name = models.CharField(max_length=64)
+    brand = models.CharField(max_length=64)
     calories = models.PositiveIntegerField()
+
+    def __str__(self):
+        return '{} ({})'.format(self.name, self.brand)