free coach implementation
This commit is contained in:
@@ -8,13 +8,13 @@ atomicwrites==1.3.0
|
|||||||
attrs==19.1.0
|
attrs==19.1.0
|
||||||
backcall==0.1.0
|
backcall==0.1.0
|
||||||
beautifulsoup4==4.7.1
|
beautifulsoup4==4.7.1
|
||||||
billiard==3.5.0.5
|
billiard==3.6.0.0
|
||||||
bleach==3.1.0
|
bleach==3.1.0
|
||||||
bokeh==1.0.4
|
bokeh==1.0.4
|
||||||
boto==2.49.0
|
boto==2.49.0
|
||||||
braintree==3.51.0
|
braintree==3.51.0
|
||||||
cairocffi==1.0.2
|
cairocffi==1.0.2
|
||||||
celery==4.2.2
|
celery==4.3.0
|
||||||
certifi==2019.3.9
|
certifi==2019.3.9
|
||||||
cffi==1.12.2
|
cffi==1.12.2
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
@@ -46,9 +46,10 @@ django-leaflet==0.24.0
|
|||||||
django-mailbox==4.7.1
|
django-mailbox==4.7.1
|
||||||
django-oauth-toolkit==1.2.0
|
django-oauth-toolkit==1.2.0
|
||||||
django-oauth2-provider==0.2.6.1
|
django-oauth2-provider==0.2.6.1
|
||||||
|
django-redis==4.10.0
|
||||||
django-rest-framework==0.1.0
|
django-rest-framework==0.1.0
|
||||||
django-rest-swagger==2.2.0
|
django-rest-swagger==2.2.0
|
||||||
django-rq==2.0
|
django-rq==1.3.1
|
||||||
django-rq-dashboard==0.3.3
|
django-rq-dashboard==0.3.3
|
||||||
django-ses==0.8.10
|
django-ses==0.8.10
|
||||||
django-shell-plus==1.1.7
|
django-shell-plus==1.1.7
|
||||||
@@ -66,7 +67,9 @@ Faker==1.0.4
|
|||||||
fitparse==1.1.0
|
fitparse==1.1.0
|
||||||
Flask==1.0.2
|
Flask==1.0.2
|
||||||
future==0.17.1
|
future==0.17.1
|
||||||
|
GDAL==2.3.3
|
||||||
geocoder==1.38.1
|
geocoder==1.38.1
|
||||||
|
geos==0.2.1
|
||||||
holoviews==1.11.3
|
holoviews==1.11.3
|
||||||
html5lib==1.0.1
|
html5lib==1.0.1
|
||||||
htmlmin==0.1.12
|
htmlmin==0.1.12
|
||||||
@@ -96,7 +99,7 @@ jupyterlab==0.35.4
|
|||||||
jupyterlab-server==0.3.0
|
jupyterlab-server==0.3.0
|
||||||
keyring==18.0.0
|
keyring==18.0.0
|
||||||
kiwisolver==1.0.1
|
kiwisolver==1.0.1
|
||||||
kombu==4.3.0
|
kombu==4.5.0
|
||||||
lxml==4.3.2
|
lxml==4.3.2
|
||||||
Markdown==3.0.1
|
Markdown==3.0.1
|
||||||
MarkupSafe==1.1.1
|
MarkupSafe==1.1.1
|
||||||
@@ -129,9 +132,9 @@ pip-upgrader==1.4.6
|
|||||||
pluggy==0.9.0
|
pluggy==0.9.0
|
||||||
prometheus-client==0.6.0
|
prometheus-client==0.6.0
|
||||||
prompt-toolkit==2.0.9
|
prompt-toolkit==2.0.9
|
||||||
|
psycopg2==2.8.1
|
||||||
ptyprocess==0.6.0
|
ptyprocess==0.6.0
|
||||||
py==1.8.0
|
py==1.8.0
|
||||||
pycairo==1.18.0
|
|
||||||
pycparser==2.19
|
pycparser==2.19
|
||||||
Pygments==2.3.1
|
Pygments==2.3.1
|
||||||
pyparsing==2.3.1
|
pyparsing==2.3.1
|
||||||
@@ -157,10 +160,9 @@ ratelim==0.1.6
|
|||||||
redis==3.2.1
|
redis==3.2.1
|
||||||
requests==2.21.0
|
requests==2.21.0
|
||||||
requests-oauthlib==1.2.0
|
requests-oauthlib==1.2.0
|
||||||
rowingdata==2.3.5
|
rowingdata==2.3.8
|
||||||
rowingphysics==0.5.0
|
rowingphysics==0.5.0
|
||||||
rq==1.0
|
rq==0.13.0
|
||||||
rq-dashboard==0.4.0
|
|
||||||
scipy==1.2.1
|
scipy==1.2.1
|
||||||
SecretStorage==3.1.1
|
SecretStorage==3.1.1
|
||||||
Send2Trash==1.5.0
|
Send2Trash==1.5.0
|
||||||
@@ -188,8 +190,10 @@ VerbalExpressions==0.0.2
|
|||||||
vine==1.3.0
|
vine==1.3.0
|
||||||
wcwidth==0.1.7
|
wcwidth==0.1.7
|
||||||
webencodings==0.5.1
|
webencodings==0.5.1
|
||||||
Werkzeug==0.15.2
|
Werkzeug==0.15.1
|
||||||
widgetsnbextension==3.4.2
|
widgetsnbextension==3.4.2
|
||||||
|
winkerberos==0.7.0
|
||||||
|
xlrd==1.2.0
|
||||||
xmltodict==0.12.0
|
xmltodict==0.12.0
|
||||||
yamjam==0.1.7
|
yamjam==0.1.7
|
||||||
yamllint==1.15.0
|
yamllint==1.15.0
|
||||||
|
|||||||
@@ -6,8 +6,36 @@
|
|||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<h1>New Coach Registration (free Coach Plan)</h1>
|
|
||||||
<ul class="main-content">
|
<ul class="main-content">
|
||||||
|
<li class="grid_4">
|
||||||
|
<h1>New Coach Registration (free Coach Plan)</h1>
|
||||||
|
</li>
|
||||||
|
<li class="rounder grid_2">
|
||||||
|
<a href="/rowers/coachregister">
|
||||||
|
<h1>Register as a coach (free)</h1>
|
||||||
|
<p>Click here and fill out the form to start with a free Coach plan. This allows you
|
||||||
|
to manage up to 10 athletes (who have to be on the Pro plan). You cannot upload your own
|
||||||
|
workouts.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
From this free plan, you can upgrade to any of the paid plans, including coach plans for larger
|
||||||
|
athlete groups or rower plans for managing your own training plan and workouts.
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="rounder grid_2">
|
||||||
|
<a href="/rowers/register">
|
||||||
|
<h1>Register as an athlete (free)</h1>
|
||||||
|
<p>Click here and fill out the form to start with a free Athlete plan. This allows you
|
||||||
|
to store and analyze your own workouts.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
From this free plan, you can upgrade to any of the paid plans, including
|
||||||
|
coach plans for managing larger athlete groups or rower plans for expanded
|
||||||
|
analytics.
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
<div id="registrationform">
|
<div id="registrationform">
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,36 @@
|
|||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<h1>New User Registration</h1>
|
|
||||||
<ul class="main-content">
|
<ul class="main-content">
|
||||||
|
<li class="grid_4">
|
||||||
|
<h1>New User Registration</h1>
|
||||||
|
</li>
|
||||||
|
<li class="rounder grid_2">
|
||||||
|
<a href="/rowers/coachregister">
|
||||||
|
<h1>Register as a coach (free)</h1>
|
||||||
|
<p>Click here and fill out the form to start with a free Coach plan. This allows you
|
||||||
|
to manage up to 10 athletes (who have to be on the Pro plan). You cannot upload your own
|
||||||
|
workouts.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
From this free plan, you can upgrade to any of the paid plans, including coach plans for larger
|
||||||
|
athlete groups or rower plans for managing your own training plan and workouts.
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="rounder grid_2">
|
||||||
|
<a href="/rowers/register">
|
||||||
|
<h1>Register as an athlete (free)</h1>
|
||||||
|
<p>Click here and fill out the form to start with a free Athlete plan. This allows you
|
||||||
|
to store and analyze your own workouts.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
From this free plan, you can upgrade to any of the paid plans, including
|
||||||
|
coach plans for managing larger athlete groups or rower plans for expanded
|
||||||
|
analytics.
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
<div id="registrationform">
|
<div id="registrationform">
|
||||||
|
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ def is_promember(user):
|
|||||||
@register.filter
|
@register.filter
|
||||||
def is_manager(user):
|
def is_manager(user):
|
||||||
r = Rower.objects.get(user=user)
|
r = Rower.objects.get(user=user)
|
||||||
return r.rowerplan == 'coach'
|
return 'coach' in r.rowerplan
|
||||||
|
|
||||||
from rowers.views import hasplannedsessions
|
from rowers.views import hasplannedsessions
|
||||||
@register.filter
|
@register.filter
|
||||||
|
|||||||
@@ -1009,7 +1009,7 @@ def iscoachmember(user):
|
|||||||
r = Rower(user=user)
|
r = Rower(user=user)
|
||||||
r.save()
|
r.save()
|
||||||
|
|
||||||
result = user.is_authenticated and (r.rowerplan=='coach')
|
result = user.is_authenticated and ('coach' in r.rowerplan)
|
||||||
else:
|
else:
|
||||||
result = False
|
result = False
|
||||||
|
|
||||||
@@ -1025,7 +1025,7 @@ def cancreateteam(user):
|
|||||||
r = Rower(user=user)
|
r = Rower(user=user)
|
||||||
r.save()
|
r.save()
|
||||||
|
|
||||||
if user.is_authenticated and (r.rowerplan=='coach'):
|
if user.is_authenticated and ('coach' in r.rowerplan):
|
||||||
return True
|
return True
|
||||||
elif user.is_athenticated() and r.rowerplan in ['plan','pro']:
|
elif user.is_athenticated() and r.rowerplan in ['plan','pro']:
|
||||||
ts = Team.objects.filter(manager=user)
|
ts = Team.objects.filter(manager=user)
|
||||||
|
|||||||
@@ -3842,6 +3842,9 @@ def workout_upload_view(request,
|
|||||||
is_ajax = True
|
is_ajax = True
|
||||||
|
|
||||||
r = getrower(request.user)
|
r = getrower(request.user)
|
||||||
|
if r.rowerplan == 'freecoach':
|
||||||
|
url = reverse('team_workout_upload_view')
|
||||||
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
breadcrumbs = [
|
breadcrumbs = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user