Merge branch 'feature/plantrial' into develop
This commit is contained in:
@@ -6,11 +6,8 @@
|
|||||||
<div class="grid_6 alpha">
|
<div class="grid_6 alpha">
|
||||||
<h2>Coach and Self-Coach Membership</h2>
|
<h2>Coach and Self-Coach Membership</h2>
|
||||||
|
|
||||||
<p>You have arrived at this page, because you tried to create a
|
<p>Rowsandall.com's Training Planning functionality
|
||||||
training plan for yourself.</p>
|
is part of the paid "Self-Coach" and "Coach" plans.</p>
|
||||||
|
|
||||||
<p>This option is restricted to rowers on our "Self-Coach" plan or
|
|
||||||
coaches on our "Coach" plan.</p>
|
|
||||||
|
|
||||||
<p>On the "Self-Coach" plan, you can plan your own sessions.</p>
|
<p>On the "Self-Coach" plan, you can plan your own sessions.</p>
|
||||||
|
|
||||||
@@ -32,7 +29,8 @@
|
|||||||
<div class="grid_6 omega">
|
<div class="grid_6 omega">
|
||||||
<h2>What training planning functionality do we offer?</h2>
|
<h2>What training planning functionality do we offer?</h2>
|
||||||
|
|
||||||
<p>Over the spring of 2018, we will gradually expand this functionality.
|
<p>Over the spring of 2018, we are rolling out the first phases
|
||||||
|
of Training Planning functionality.
|
||||||
Our current roadmap is to deploy the following and more:</li>
|
Our current roadmap is to deploy the following and more:</li>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -45,12 +43,15 @@
|
|||||||
<li><b>Implemented:</b>Track your teams performance against plan. See how well each
|
<li><b>Implemented:</b>Track your teams performance against plan. See how well each
|
||||||
of your team members adhere to their (team or personalized) plan.</li>
|
of your team members adhere to their (team or personalized) plan.</li>
|
||||||
<li><b>Implemented:</b>See test outcomes ranked by performance.</li>
|
<li><b>Implemented:</b>See test outcomes ranked by performance.</li>
|
||||||
<li><b>Implemented:</b>Attach courses to your OTW tests. This advanced functionality
|
<li><b>Implemented:</b>Attach courses to your OTW tests.
|
||||||
|
This advanced functionality
|
||||||
allows you, for example, to assign "Row the 6km from bridge A to
|
allows you, for example, to assign "Row the 6km from bridge A to
|
||||||
bridge B on Saturday" to your team members. The resulting workout
|
bridge B on Saturday" to your team members. The resulting workout
|
||||||
tracks will be evaluated against the course, and you will receive
|
tracks will be evaluated against the course, and you will receive
|
||||||
a results table for the net time spent between the start and finish
|
a results table for the net time spent between the start and finish
|
||||||
points on the course. It's like a mini head race.
|
points on the course. It's like a mini head race.
|
||||||
|
<li>Define your own macro, meso and microcycle start and end dates</li>
|
||||||
|
<li>More to come ... </li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -135,11 +135,13 @@ You will be taken to the secure PayPal payment site.
|
|||||||
<h2>Free Trial</h2>
|
<h2>Free Trial</h2>
|
||||||
<p>
|
<p>
|
||||||
You qualify for a 14 day free trial. No credit card needed.
|
You qualify for a 14 day free trial. No credit card needed.
|
||||||
Try out Pro membership for two weeks. Click the button below to
|
Try out Pro or Self-Coach membership for two weeks. Click the button below to
|
||||||
sign up for the trial. After your trial period expires, you will be
|
sign up for the trial. After your trial period expires, you will be
|
||||||
automatically reset to the Basic plan, unless you upgrade to Pro.
|
automatically reset to the Basic plan, unless you upgrade to Pro.
|
||||||
</p>
|
</p>
|
||||||
<div class="grid_6"><p><a class="button green small" href="/rowers/starttrial">Yes, I want to try Pro membership for 14 days for free. No strings attached.</a></p></div>
|
<div class="grid_6"><p><a class="button green small" href="/rowers/starttrial">Yes, I want to try Pro membership for 14 days for free. No strings attached.</a></p></div>
|
||||||
|
<div class="grid_6"> </div>
|
||||||
|
<div class="grid_6"><p><a class="button green small" href="/rowers/startplantrial">Yes, I want to try Self-Coach membership for 14 days for free. No strings attached.</a></p></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<h2>Recurring Payment</h2>
|
<h2>Recurring Payment</h2>
|
||||||
|
|||||||
@@ -395,6 +395,7 @@ urlpatterns = [
|
|||||||
url(r'^analysis', TemplateView.as_view(template_name='analysis.html'),name='analysis'),
|
url(r'^analysis', TemplateView.as_view(template_name='analysis.html'),name='analysis'),
|
||||||
url(r'^promembership', TemplateView.as_view(template_name='promembership.html'),name='promembership'),
|
url(r'^promembership', TemplateView.as_view(template_name='promembership.html'),name='promembership'),
|
||||||
url(r'^starttrial$',views.start_trial_view),
|
url(r'^starttrial$',views.start_trial_view),
|
||||||
|
url(r'^startplantrial$',views.start_plantrial_view),
|
||||||
url(r'^planmembership', TemplateView.as_view(template_name='planmembership.html'),name='planmembership'),
|
url(r'^planmembership', TemplateView.as_view(template_name='planmembership.html'),name='planmembership'),
|
||||||
url(r'^paypaltest', TemplateView.as_view(template_name='paypaltest.html'),name='paypaltest'),
|
url(r'^paypaltest', TemplateView.as_view(template_name='paypaltest.html'),name='paypaltest'),
|
||||||
url(r'^legal', TemplateView.as_view(template_name='legal.html'),name='legal'),
|
url(r'^legal', TemplateView.as_view(template_name='legal.html'),name='legal'),
|
||||||
|
|||||||
@@ -876,6 +876,8 @@ def hasplannedsessions(user):
|
|||||||
r.save()
|
r.save()
|
||||||
|
|
||||||
result = user.is_authenticated() and (r.rowerplan=='coach' or r.rowerplan=='plan')
|
result = user.is_authenticated() and (r.rowerplan=='coach' or r.rowerplan=='plan')
|
||||||
|
if not result and r.plantrialexpires:
|
||||||
|
result = user.is_authenticaded() and r.rowerplan=='basic' and r.plantrialexpires >= datetime.date.today()
|
||||||
else:
|
else:
|
||||||
result = False
|
result = False
|
||||||
|
|
||||||
@@ -1040,6 +1042,35 @@ def start_trial_view(request):
|
|||||||
|
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
|
@login_required()
|
||||||
|
def start_plantrial_view(request):
|
||||||
|
r = getrower(request.user)
|
||||||
|
|
||||||
|
if r.plantrialexpires is not None:
|
||||||
|
messages.error(request,'You do not qualify for a trial')
|
||||||
|
url = '/rowers/promembership'
|
||||||
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
|
r.plantrialexpires = datetime.date.today()+datetime.timedelta(13)
|
||||||
|
r.protrialexpires = datetime.date.today()+datetime.timedelta(13)
|
||||||
|
r.save()
|
||||||
|
|
||||||
|
url = reverse(workouts_view)
|
||||||
|
|
||||||
|
messages.info(request,'We have started your 14 day trial period')
|
||||||
|
|
||||||
|
subject2 = "User started Pro Trial"
|
||||||
|
message2 = "User Started Pro Trial.\n"
|
||||||
|
message2 += request.user.email + "\n"
|
||||||
|
message2 += "User name: "+request.user.username
|
||||||
|
|
||||||
|
send_mail(subject2, message2,
|
||||||
|
'Rowsandall Server <info@rowsandall.com>',
|
||||||
|
['roosendaalsander@gmail.com'])
|
||||||
|
|
||||||
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
|
|
||||||
# Create workout data from Strava or Concept2
|
# Create workout data from Strava or Concept2
|
||||||
# data and create the associated Workout object and save it
|
# data and create the associated Workout object and save it
|
||||||
def add_workout_from_strokedata(user,importid,data,strokedata,
|
def add_workout_from_strokedata(user,importid,data,strokedata,
|
||||||
|
|||||||
@@ -158,10 +158,12 @@
|
|||||||
{% elif user.rower.rowerplan == 'plan' %}
|
{% elif user.rower.rowerplan == 'plan' %}
|
||||||
<h6 class="graytext">Self-Coach</h6>
|
<h6 class="graytext">Self-Coach</h6>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="grid_1"><p><a class="button green small" href="/rowers/promembership">Upgrade to Pro</a></p></div>
|
<div class="grid_1"><p><a class="button green small" href="/rowers/promembership"><b>Upgrade</b></a></p></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.rower.rowerplan == 'basic' and user.rower.protrialexpires|date_dif == 1 %}
|
{% if user.rower.rowerplan == 'basic' and user.rower.protrialexpires|date_dif == 1 %}
|
||||||
<div class="grid_1"><p><a class="button green small" href="/rowers/promembership">Start Free Pro trial</a></p></div>
|
<div class="grid_1"><p><a class="button green small" href="/rowers/promembership">Start Free Pro trial</a></p></div>
|
||||||
|
{% elif user.rower.rowerplan == 'basic' and user.rower.plantrialexpires|date_dif == 1 %}
|
||||||
|
<div class="grid_1"><p><a class="button green small" href="/rowers/promembership">Start Free Plan trial</a></p></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -243,8 +245,14 @@
|
|||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.rower.protrialexpires and user.rower.protrialexpires|is_future_date %}
|
{% if user.rower.protrialexpires and user.rower.protrialexpires|is_future_date %}
|
||||||
|
{% if user.rower.plantrialexpires %}
|
||||||
<p class="successmessage">
|
<p class="successmessage">
|
||||||
{{ user.rower.protrialexpires|date_dif|ddays }} days left in Pro trial
|
{{ user.rower.protrialexpires|date_dif|ddays }} days left of your Self-Coach trial - Would you like to <a href="/rowers/planmembership">upgrade now?</a>
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
<p class="successmessage">
|
||||||
|
{{ user.rower.protrialexpires|date_dif|ddays }} days left of your Pro trial - Would you like to <a href="/rowers/promembership">upgrade now?</a>
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.rower.emailbounced %}
|
{% if user.rower.emailbounced %}
|
||||||
|
|||||||
Reference in New Issue
Block a user