From e23b136b3a6ed786e3d75a1e5f81e401b581455e Mon Sep 17 00:00:00 2001 From: James Turk Date: Tue, 16 Jun 2015 17:03:04 -0400 Subject: [PATCH] LiftOptions --- lifting/models.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lifting/models.py b/lifting/models.py index 21014ad..93189c7 100644 --- a/lifting/models.py +++ b/lifting/models.py @@ -41,6 +41,16 @@ class LiftingOptions(models.Model): raise ValueError('remaining weight {}'.format(initial_weight - sum(side) * 2)) return side + +class LiftOptions(models.Model): + user = models.ForeignKey(User, related_name='lift_options') + lift = models.ForeignKey(Lift, related_name='options') + + bar = models.ForeignKey(Bar, null=True) + extra_start_weight = models.DecimalField(max_digits=7, decimal_places=3, default=0) + increment = models.DecimalField(max_digits=5, decimal_places=3, default=5) + + class Set(models.Model): user = models.ForeignKey(User, related_name='sets') date = models.DateField()