diff --git a/rowers/forms.py b/rowers/forms.py index f4877106..31739429 100644 --- a/rowers/forms.py +++ b/rowers/forms.py @@ -957,6 +957,7 @@ class FlexAxesForm(forms.Form): choices=yaxchoices2,label='Right Axis',required=True) def __init__(self,request,*args,**kwargs): + extrametrics = kwargs.pop('extrametrics',[]) super(FlexAxesForm, self).__init__(*args, **kwargs) rower = Rower.objects.get(user=request.user) diff --git a/rowers/templates/frontpage.html b/rowers/templates/frontpage.html index 2ebb9fb4..1d7112b2 100644 --- a/rowers/templates/frontpage.html +++ b/rowers/templates/frontpage.html @@ -46,8 +46,8 @@
  • -

    -
    SIGN UP FREE
    +

    +
    SIGN UP FREE

  • @@ -77,9 +77,6 @@ {% endif %} -
  • -

    WHAT WE OFFER

    -
  • {% for offering in offerings %}
  • {{ offering.name }}

    diff --git a/rowers/templates/registration/login.html b/rowers/templates/registration/login.html index 354a5918..10e2f027 100644 --- a/rowers/templates/registration/login.html +++ b/rowers/templates/registration/login.html @@ -7,7 +7,7 @@ {% endif %}
      -
    • +
    • {% csrf_token %} diff --git a/rowers/views.py b/rowers/views.py index 7e445fac..de1291a8 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -8792,13 +8792,18 @@ def workout_flexchart3_view(request,*args,**kwargs): workstrokesonly = not includereststrokes flexaxesform = FlexAxesForm(request,request.POST) - + print request.POST if flexaxesform.is_valid(): + print 'form valid' cd = flexaxesform.cleaned_data xparam = cd['xaxis'] yparam1 = cd['yaxis1'] yparam2 = cd['yaxis2'] + else: + print flexaxesform.errors + + print xparam,yparam1,yparam2 if not promember: 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') # bring back slashes - yparam1 = yparam1.replace('_slsh_','/') - yparam2 = yparam2.replace('_slsh_','/') - xparam = xparam.replace('_slsh_','/') +# yparam1 = yparam1.replace('_slsh_','/') +# yparam2 = yparam2.replace('_slsh_','/') +# xparam = xparam.replace('_slsh_','/') # create interactive plot try: @@ -8878,25 +8883,27 @@ def workout_flexchart3_view(request,*args,**kwargs): 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_') - yparam1 = yparam1.replace('/','_slsh_') - yparam2 = yparam2.replace('/','_slsh_') + # xparam = xparam.replace('/','_slsh_') + # yparam1 = yparam1.replace('/','_slsh_') + # yparam2 = yparam2.replace('/','_slsh_') - for metric in nometrics: - try: - extrametrics.pop(metric) - except KeyError: - pass - +# for metric in nometrics: +# try: +# extrametrics.pop(metric) +# except KeyError: +# pass + initial = { 'xaxis':xparam, 'yaxis1':yparam1, - 'yaxis2':yparam2 + 'yaxis2':yparam2, } - flexaxesform = FlexAxesForm(request,initial=initial) + flexaxesform = FlexAxesForm(request,initial=initial, + extrametrics=extrametrics) initial = { 'includereststrokes': not workstrokesonly,