free coach has pro if four pro athletes
This commit is contained in:
@@ -651,6 +651,10 @@ class CoachingGroup(models.Model):
|
|||||||
id = self.pk,
|
id = self.pk,
|
||||||
name = self.name
|
name = self.name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __len__(self):
|
||||||
|
rs = Rower.objects.filter(coachinggroups__in=[self])
|
||||||
|
return len(rs)
|
||||||
|
|
||||||
# Extension of User with rowing specific data
|
# Extension of User with rowing specific data
|
||||||
@python_2_unicode_compatible
|
@python_2_unicode_compatible
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
<th>PRO</th>
|
<th>PRO</th>
|
||||||
<th>SELF-COACH</th>
|
<th>SELF-COACH</th>
|
||||||
<th>COACH</th>
|
<th>COACH</th>
|
||||||
|
<th>Free COACH</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Manual Import, Export, Synchronization and download of all your data</td>
|
<td>Manual Import, Export, Synchronization and download of all your data</td>
|
||||||
@@ -43,6 +45,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Heart rate and power zones</td>
|
<td>Heart rate and power zones</td>
|
||||||
@@ -50,6 +53,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Ranking Pieces, Stroke Analysis</td>
|
<td>Ranking Pieces, Stroke Analysis</td>
|
||||||
@@ -57,6 +61,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Automatic Synchronization with other fitness sites</td>
|
<td>Automatic Synchronization with other fitness sites</td>
|
||||||
@@ -64,6 +69,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Advanced Analysis (Critical Power, Stats, Box Chart, Trend Flex)</td>
|
<td>Advanced Analysis (Critical Power, Stats, Box Chart, Trend Flex)</td>
|
||||||
@@ -71,6 +77,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔<a href="#freecoach">*</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Compare Workouts</td>
|
<td>Compare Workouts</td>
|
||||||
@@ -78,6 +85,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔<a href="#freecoach">*</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Empower Stroke Profile</td>
|
<td>Empower Stroke Profile</td>
|
||||||
@@ -85,6 +93,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔<a href="#freecoach">*</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Sensor Fusion, Split Workout, In-stroke metrics</td>
|
<td>Sensor Fusion, Split Workout, In-stroke metrics</td>
|
||||||
@@ -92,6 +101,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔<a href="#freecoach">*</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Create and manage groups.</td>
|
<td>Create and manage groups.</td>
|
||||||
@@ -99,6 +109,7 @@
|
|||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Create Training plans, tests and challenges for yourself and your training group. Track your performance
|
<td>Create Training plans, tests and challenges for yourself and your training group. Track your performance
|
||||||
@@ -107,6 +118,7 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Create Training plans, tests and challenges for your athletes. Track their performance
|
<td>Create Training plans, tests and challenges for your athletes. Track their performance
|
||||||
@@ -115,6 +127,7 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Manage your athlete's workouts</td>
|
<td>Manage your athlete's workouts</td>
|
||||||
@@ -122,6 +135,7 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Run analytics for your athletes</td>
|
<td>Run analytics for your athletes</td>
|
||||||
@@ -129,6 +143,7 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔<a href="#freecoach">*</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Change zone intensities and other workout related settings for your athletes</td>
|
<td>Change zone intensities and other workout related settings for your athletes</td>
|
||||||
@@ -136,6 +151,7 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
|
<td>✔</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Pricing</td>
|
<td>Pricing</td>
|
||||||
@@ -143,6 +159,7 @@
|
|||||||
<td nowrap="nowrap">From 25€/year</td>
|
<td nowrap="nowrap">From 25€/year</td>
|
||||||
<td nowrap="nowrap">From 75€/year</td>
|
<td nowrap="nowrap">From 75€/year</td>
|
||||||
<td nowrap="nowrap">From 90€/year</td>
|
<td nowrap="nowrap">From 90€/year</td>
|
||||||
|
<td nowrap="nowrap">Free</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
@@ -310,10 +327,12 @@
|
|||||||
can purchase upgrades to "Pro" and "Self-Coach" plans.
|
can purchase upgrades to "Pro" and "Self-Coach" plans.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p id="freecoach">
|
||||||
The Coach plans come in two versions: free and paid. On the free coach plan,
|
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
|
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
|
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.
|
site functionality for your own workouts and those of your athletes.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
@@ -20,6 +20,7 @@ import requests
|
|||||||
|
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
|
|
||||||
|
|
||||||
lbstoN = 4.44822
|
lbstoN = 4.44822
|
||||||
|
|
||||||
landingpages = (
|
landingpages = (
|
||||||
@@ -407,8 +408,12 @@ def totaltime_sec_to_string(totaltime):
|
|||||||
def isprorower(r):
|
def isprorower(r):
|
||||||
result = False
|
result = False
|
||||||
result = r.rowerplan in ['pro','coach','plan']
|
result = r.rowerplan in ['pro','coach','plan']
|
||||||
|
|
||||||
if not result and r.protrialexpires:
|
if not result and r.protrialexpires:
|
||||||
result = r.rowerplan == 'basic' and r.protrialexpires >= datetime.date.today()
|
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
|
return result
|
||||||
|
|
||||||
|
|||||||
@@ -1049,7 +1049,8 @@ def hasplannedsessions(user):
|
|||||||
|
|
||||||
return result
|
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
|
# Check if a user is a Pro member
|
||||||
def ispromember(user):
|
def ispromember(user):
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
background-image: url("/static/img/landing8b.jpg");
|
background-image: url("/static/img/landing8b.jpg");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.watermark {
|
.watermark {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
float: center;
|
float: center;
|
||||||
|
|||||||
@@ -26,6 +26,11 @@
|
|||||||
background-image: url("/static/img/landing8b.jpg");
|
background-image: url("/static/img/landing8b.jpg");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.errorlist {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.watermark {
|
.watermark {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
float: center;
|
float: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user