diff --git a/rowers/models.py b/rowers/models.py index 7f50af9f..2fec8b3f 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -651,6 +651,10 @@ class CoachingGroup(models.Model): id = self.pk, name = self.name ) + + def __len__(self): + rs = Rower.objects.filter(coachinggroups__in=[self]) + return len(rs) # Extension of User with rowing specific data @python_2_unicode_compatible diff --git a/rowers/templates/paidplans.html b/rowers/templates/paidplans.html index 4038f032..5d27fb7c 100644 --- a/rowers/templates/paidplans.html +++ b/rowers/templates/paidplans.html @@ -27,6 +27,7 @@
+
The Coach plans come in two versions: free and paid. On the free coach plan, you can only have athletes who are on the PRO paid plans or higher, and you - cannot upload any workouts to your own account. On the paid + cannot upload any workouts to your own account. Some of the advanced Analysis functionality + becomes available when the athlete group is larger than 4. + On the paid plans, your athletes can be on the free plan, and you have full access to the site functionality for your own workouts and those of your athletes.
diff --git a/rowers/tests/testdata/testdata.csv.gz b/rowers/tests/testdata/testdata.csv.gz index b9e56fb2..556f84d6 100644 Binary files a/rowers/tests/testdata/testdata.csv.gz and b/rowers/tests/testdata/testdata.csv.gz differ diff --git a/rowers/utils.py b/rowers/utils.py index f0a1d4b9..d4e47993 100644 --- a/rowers/utils.py +++ b/rowers/utils.py @@ -20,6 +20,7 @@ import requests from django.http import HttpResponse + lbstoN = 4.44822 landingpages = ( @@ -407,8 +408,12 @@ def totaltime_sec_to_string(totaltime): def isprorower(r): result = False result = r.rowerplan in ['pro','coach','plan'] + if not result and r.protrialexpires: result = r.rowerplan == 'basic' and r.protrialexpires >= datetime.date.today() + if not result and r.rowerplan == 'freecoach': + if r.mycoachgroup is not None: + result = len(r.mycoachgroup)>=4 return result diff --git a/rowers/views/statements.py b/rowers/views/statements.py index 045ef2ea..8b9a9991 100644 --- a/rowers/views/statements.py +++ b/rowers/views/statements.py @@ -1049,7 +1049,8 @@ def hasplannedsessions(user): return result -from rowers.utils import isprorower,ProcessorCustomerError +from rowers.utils import ProcessorCustomerError +from rowers.utils import isprorower # Check if a user is a Pro member def ispromember(user): diff --git a/static/css/rowsandall.css b/static/css/rowsandall.css index 86682c66..4e6f3ab2 100644 --- a/static/css/rowsandall.css +++ b/static/css/rowsandall.css @@ -26,6 +26,7 @@ background-image: url("/static/img/landing8b.jpg"); } + .watermark { position: absolute; float: center; diff --git a/static/css/rowsandall2.css b/static/css/rowsandall2.css index 2f0ccff9..9dd82684 100644 --- a/static/css/rowsandall2.css +++ b/static/css/rowsandall2.css @@ -26,6 +26,11 @@ background-image: url("/static/img/landing8b.jpg"); } +.errorlist { + color: red; +} + + .watermark { position: absolute; float: center;