Merge branch 'release/v8.11'
This commit is contained in:
@@ -957,6 +957,7 @@ class FlexAxesForm(forms.Form):
|
|||||||
choices=yaxchoices2,label='Right Axis',required=True)
|
choices=yaxchoices2,label='Right Axis',required=True)
|
||||||
|
|
||||||
def __init__(self,request,*args,**kwargs):
|
def __init__(self,request,*args,**kwargs):
|
||||||
|
extrametrics = kwargs.pop('extrametrics',[])
|
||||||
super(FlexAxesForm, self).__init__(*args, **kwargs)
|
super(FlexAxesForm, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
rower = Rower.objects.get(user=request.user)
|
rower = Rower.objects.get(user=request.user)
|
||||||
|
|||||||
@@ -46,8 +46,8 @@
|
|||||||
</li>
|
</li>
|
||||||
<li style="text-align: center;">
|
<li style="text-align: center;">
|
||||||
<a class="button midden" href="/rowers/register">
|
<a class="button midden" href="/rowers/register">
|
||||||
<h1 class="midden">
|
<h2 class="midden rounder whiteborder">
|
||||||
<div class="rounder whiteborder">SIGN UP FREE</div>
|
<div>SIGN UP FREE</div>
|
||||||
</h1>
|
</h1>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -77,9 +77,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="grid_5">
|
|
||||||
<h2 class="midden">WHAT WE OFFER</h2>
|
|
||||||
</li>
|
|
||||||
{% for offering in offerings %}
|
{% for offering in offerings %}
|
||||||
<li class="frontitem">
|
<li class="frontitem">
|
||||||
<h3 class="midden">{{ offering.name }}</h3>
|
<h3 class="midden">{{ offering.name }}</h3>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<ul class="main-content">
|
<ul class="main-content">
|
||||||
<li class="frontitem">
|
<li class="grid_2 frontitem">
|
||||||
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
|
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
+22
-15
@@ -8792,13 +8792,18 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
workstrokesonly = not includereststrokes
|
workstrokesonly = not includereststrokes
|
||||||
|
|
||||||
flexaxesform = FlexAxesForm(request,request.POST)
|
flexaxesform = FlexAxesForm(request,request.POST)
|
||||||
|
print request.POST
|
||||||
|
|
||||||
if flexaxesform.is_valid():
|
if flexaxesform.is_valid():
|
||||||
|
print 'form valid'
|
||||||
cd = flexaxesform.cleaned_data
|
cd = flexaxesform.cleaned_data
|
||||||
xparam = cd['xaxis']
|
xparam = cd['xaxis']
|
||||||
yparam1 = cd['yaxis1']
|
yparam1 = cd['yaxis1']
|
||||||
yparam2 = cd['yaxis2']
|
yparam2 = cd['yaxis2']
|
||||||
|
else:
|
||||||
|
print flexaxesform.errors
|
||||||
|
|
||||||
|
print xparam,yparam1,yparam2
|
||||||
|
|
||||||
if not promember:
|
if not promember:
|
||||||
for name,d in rowingmetrics:
|
for name,d in rowingmetrics:
|
||||||
@@ -8814,9 +8819,9 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
messages.info(request,'To use '+d['verbose_name']+', you have to be Pro member')
|
messages.info(request,'To use '+d['verbose_name']+', you have to be Pro member')
|
||||||
|
|
||||||
# bring back slashes
|
# bring back slashes
|
||||||
yparam1 = yparam1.replace('_slsh_','/')
|
# yparam1 = yparam1.replace('_slsh_','/')
|
||||||
yparam2 = yparam2.replace('_slsh_','/')
|
# yparam2 = yparam2.replace('_slsh_','/')
|
||||||
xparam = xparam.replace('_slsh_','/')
|
# xparam = xparam.replace('_slsh_','/')
|
||||||
|
|
||||||
# create interactive plot
|
# create interactive plot
|
||||||
try:
|
try:
|
||||||
@@ -8878,25 +8883,27 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
additionalmetrics = []
|
additionalmetrics = []
|
||||||
|
|
||||||
|
|
||||||
extrametrics = {m.replace('/','_slsh_'):m for m in additionalmetrics}
|
# extrametrics = {m.replace('/','_slsh_'):m for m in additionalmetrics}
|
||||||
|
extrametrics = additionalmetrics
|
||||||
|
|
||||||
xparam = xparam.replace('/','_slsh_')
|
# xparam = xparam.replace('/','_slsh_')
|
||||||
yparam1 = yparam1.replace('/','_slsh_')
|
# yparam1 = yparam1.replace('/','_slsh_')
|
||||||
yparam2 = yparam2.replace('/','_slsh_')
|
# yparam2 = yparam2.replace('/','_slsh_')
|
||||||
|
|
||||||
|
|
||||||
for metric in nometrics:
|
# for metric in nometrics:
|
||||||
try:
|
# try:
|
||||||
extrametrics.pop(metric)
|
# extrametrics.pop(metric)
|
||||||
except KeyError:
|
# except KeyError:
|
||||||
pass
|
# pass
|
||||||
|
|
||||||
initial = {
|
initial = {
|
||||||
'xaxis':xparam,
|
'xaxis':xparam,
|
||||||
'yaxis1':yparam1,
|
'yaxis1':yparam1,
|
||||||
'yaxis2':yparam2
|
'yaxis2':yparam2,
|
||||||
}
|
}
|
||||||
flexaxesform = FlexAxesForm(request,initial=initial)
|
flexaxesform = FlexAxesForm(request,initial=initial,
|
||||||
|
extrametrics=extrametrics)
|
||||||
|
|
||||||
initial = {
|
initial = {
|
||||||
'includereststrokes': not workstrokesonly,
|
'includereststrokes': not workstrokesonly,
|
||||||
|
|||||||
Reference in New Issue
Block a user