updated paid plans page
This commit is contained in:
@@ -188,7 +188,7 @@ class Command(BaseCommand):
|
||||
res = polarstuff.get_all_new_workouts(polar_available)
|
||||
|
||||
# Concept2
|
||||
rowers = Rower.objects.filter(c2_auto_import=True)
|
||||
rowers = Rower.objects.filter(c2_auto_import=True).exclude(rowerplan='basic')
|
||||
for r in rowers:
|
||||
c2stuff.get_c2_workouts(r)
|
||||
|
||||
@@ -287,7 +287,7 @@ class Command(BaseCommand):
|
||||
message.delete()
|
||||
|
||||
# Strava
|
||||
rowers = Rower.objects.filter(strava_auto_import=True)
|
||||
rowers = Rower.objects.filter(strava_auto_import=True).exclude(rowerplan='basic')
|
||||
for r in rowers:
|
||||
stravastuff.get_strava_workouts(r)
|
||||
|
||||
|
||||
@@ -94,7 +94,14 @@
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Create Training plans, tests and challenges for yourself. Track your performance
|
||||
<td>Create and manage groups.</td>
|
||||
<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
|
||||
against plan.</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
@@ -110,14 +117,21 @@
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Create and manage teams.</td>
|
||||
<td>Manage your athlete's workouts</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Manage your athlete's workouts</td>
|
||||
<td>Run analytics for your athletes</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>✔</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Change zone intensities and other workout related settings for your athletes</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
|
||||
{% block main %}
|
||||
<h1>Import and Export Settings for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
|
||||
|
||||
{% if user.rower.rowerplan == 'basic' %}
|
||||
The auto import and export settings only work on <a href="/rowers/paidplans/">a paid plan</a>.
|
||||
{% endif %}
|
||||
|
||||
{% if form.errors %}
|
||||
<p style="color: red;">
|
||||
Please correct the error{{ form.errors|pluralize }} below.
|
||||
|
||||
@@ -983,15 +983,6 @@ class PermissionsViewTests(TestCase):
|
||||
response = self.c.get(url)
|
||||
self.assertEqual(response.status_code,200)
|
||||
|
||||
# compare
|
||||
url = reverse('team_comparison_select',
|
||||
kwargs={'id':encoder.encode_hex(self.uplan2_workouts[0].id)}
|
||||
)
|
||||
|
||||
response = self.c.get(url)
|
||||
self.assertEqual(response.status_code,200)
|
||||
|
||||
|
||||
|
||||
## Pro users (and higher) can join group led by other Pro (or higher) user
|
||||
def test_team_member_request_pro_pro(self):
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
@@ -590,7 +590,9 @@ def workouts_join_select(request,
|
||||
})
|
||||
|
||||
# Team comparison
|
||||
@login_required()
|
||||
@user_passes_test(ispromember,login_url='/rowers/paidplans/',
|
||||
message="This functionality requires a Pro plan or higher",
|
||||
redirect_field_name=None)
|
||||
def team_comparison_select(request,
|
||||
startdatestring="",
|
||||
enddatestring="",
|
||||
@@ -695,11 +697,6 @@ def team_comparison_select(request,
|
||||
except Team.DoesNotExist:
|
||||
theteam = 0
|
||||
|
||||
if requestrower.rowerplan == 'basic' and theteam==0:
|
||||
if requestrower.protrialexpires is None or requestrower.protrialexpires<datetime.date.today():
|
||||
|
||||
raise PermissionDenied("Access denied")
|
||||
|
||||
if theteam and (theteam.viewing == 'allmembers' or theteam.manager == request.user):
|
||||
workouts = Workout.objects.filter(team=theteam,
|
||||
startdatetime__gte=startdate,
|
||||
@@ -4200,7 +4197,8 @@ def workout_upload_view(request,
|
||||
|
||||
|
||||
# This is the main view for processing uploaded files
|
||||
@user_passes_test(iscoachmember,login_url="/rowers/paidplans",redirect_field_name=None)
|
||||
@user_passes_test(iscoachmember,login_url="/rowers/paidplans",redirect_field_name=None,
|
||||
message="This functionality requires a Coach plan or higher")
|
||||
def team_workout_upload_view(request,message="",
|
||||
successmessage="",
|
||||
uploadoptions={
|
||||
@@ -4516,7 +4514,9 @@ def workout_summary_restore_view(request,id,message="",successmessage=""):
|
||||
return HttpResponseRedirect(url)
|
||||
|
||||
# Split a workout
|
||||
@user_passes_test(ispromember,login_url="/rowers/paidplans",message="This functionality requires a Pro plan or higher",redirect_field_name=None)
|
||||
@user_passes_test(ispromember,login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher",
|
||||
redirect_field_name=None)
|
||||
def workout_split_view(request,id=0):
|
||||
row = get_workout_permitted(request.user,id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user