free coach has pro if four pro athletes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<th>PRO</th>
|
||||
<th>SELF-COACH</th>
|
||||
<th>COACH</th>
|
||||
<th>Free COACH</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -36,6 +37,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Manual Import, Export, Synchronization and download of all your data</td>
|
||||
@@ -43,6 +45,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heart rate and power zones</td>
|
||||
@@ -50,6 +53,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ranking Pieces, Stroke Analysis</td>
|
||||
@@ -57,6 +61,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Automatic Synchronization with other fitness sites</td>
|
||||
@@ -64,6 +69,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Advanced Analysis (Critical Power, Stats, Box Chart, Trend Flex)</td>
|
||||
@@ -71,6 +77,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔<a href="#freecoach">*</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Compare Workouts</td>
|
||||
@@ -78,6 +85,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔<a href="#freecoach">*</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Empower Stroke Profile</td>
|
||||
@@ -85,6 +93,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔<a href="#freecoach">*</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sensor Fusion, Split Workout, In-stroke metrics</td>
|
||||
@@ -92,6 +101,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔<a href="#freecoach">*</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Create and manage groups.</td>
|
||||
@@ -99,6 +109,7 @@
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Manage your athlete's workouts</td>
|
||||
@@ -122,6 +135,7 @@
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>✔</td>
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Run analytics for your athletes</td>
|
||||
@@ -129,6 +143,7 @@
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>✔</td>
|
||||
<td>✔<a href="#freecoach">*</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pricing</td>
|
||||
@@ -143,6 +159,7 @@
|
||||
<td nowrap="nowrap">From 25€/year</td>
|
||||
<td nowrap="nowrap">From 75€/year</td>
|
||||
<td nowrap="nowrap">From 90€/year</td>
|
||||
<td nowrap="nowrap">Free</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -310,10 +327,12 @@
|
||||
can purchase upgrades to "Pro" and "Self-Coach" plans.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<p id="freecoach">
|
||||
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.
|
||||
</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
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user