From b6411893e56f0a5a3a47f1666f6f658954725997 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
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
automatically reset to the Basic plan, unless you upgrade to Pro.
You have arrived at this page, because you tried to create a
- training plan for yourself. This option is restricted to rowers on our "Self-Coach" plan or
- coaches on our "Coach" plan. Rowsandall.com's Training Planning functionality
+ is part of the paid "Self-Coach" and "Coach" plans. On the "Self-Coach" plan, you can plan your own sessions. Over the spring of 2018, we will gradually expand this functionality.
+ 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:
@@ -45,12 +43,15 @@
Free Trial
Recurring Payment
diff --git a/rowers/urls.py b/rowers/urls.py
index 6d04aaa6..4f0e818f 100644
--- a/rowers/urls.py
+++ b/rowers/urls.py
@@ -395,6 +395,7 @@ urlpatterns = [
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'^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'^paypaltest', TemplateView.as_view(template_name='paypaltest.html'),name='paypaltest'),
url(r'^legal', TemplateView.as_view(template_name='legal.html'),name='legal'),
diff --git a/rowers/views.py b/rowers/views.py
index 560166d2..489ade0a 100644
--- a/rowers/views.py
+++ b/rowers/views.py
@@ -876,6 +876,8 @@ def hasplannedsessions(user):
r.save()
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:
result = False
@@ -1039,7 +1041,36 @@ def start_trial_view(request):
['roosendaalsander@gmail.com'])
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 Coach and Self-Coach Membership
- What training planning functionality do we offer?
- Self-Coach
{% else %}
-
+
{% endif %}
{% if user.rower.rowerplan == 'basic' and user.rower.protrialexpires|date_dif == 1 %}
{% elif user.rower.rowerplan == 'basic' and user.rower.plantrialexpires|date_dif == 1 %}
-
+
{% endif %}