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 @@ PRO SELF-COACH COACH + Free COACH @@ -36,6 +37,7 @@ ✔ ✔ ✔ + ✔ Manual Import, Export, Synchronization and download of all your data @@ -43,6 +45,7 @@ ✔ ✔ ✔ + ✔ Heart rate and power zones @@ -50,6 +53,7 @@ ✔ ✔ ✔ + ✔ Ranking Pieces, Stroke Analysis @@ -57,6 +61,7 @@ ✔ ✔ ✔ + ✔ Automatic Synchronization with other fitness sites @@ -64,6 +69,7 @@ ✔ ✔ ✔ +   Advanced Analysis (Critical Power, Stats, Box Chart, Trend Flex) @@ -71,6 +77,7 @@ ✔ ✔ ✔ + ✔* Compare Workouts @@ -78,6 +85,7 @@ ✔ ✔ ✔ + ✔* Empower Stroke Profile @@ -85,6 +93,7 @@ ✔ ✔ ✔ + ✔* Sensor Fusion, Split Workout, In-stroke metrics @@ -92,6 +101,7 @@ ✔ ✔ ✔ + ✔* Create and manage groups. @@ -99,6 +109,7 @@ ✔ ✔ ✔ + ✔ Create Training plans, tests and challenges for yourself and your training group. Track your performance @@ -107,6 +118,7 @@   ✔ ✔ +   Create Training plans, tests and challenges for your athletes. Track their performance @@ -115,6 +127,7 @@     ✔ + ✔ Manage your athlete's workouts @@ -122,6 +135,7 @@     ✔ + ✔ Run analytics for your athletes @@ -129,6 +143,7 @@     ✔ + ✔* Change zone intensities and other workout related settings for your athletes @@ -136,6 +151,7 @@     ✔ + ✔ Pricing @@ -143,6 +159,7 @@ From 25€/year From 75€/year From 90€/year + Free   @@ -310,10 +327,12 @@ can purchase upgrades to "Pro" and "Self-Coach" plans.

-

+

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;