diff --git a/rowers/models.py b/rowers/models.py index cbc298ef..ffdb668e 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -1200,7 +1200,8 @@ def createmicrofillers(plan): plan = plan ).order_by("startdate") - if cycles[0].startdate > plan.startdate: + + if cycles and cycles[0].startdate > plan.startdate: macr = TrainingMicroCycle( plan=plan, startdate = plan.startdate, diff --git a/rowers/templates/frontpage.html b/rowers/templates/frontpage.html index f12f6778..e4e3f7f6 100644 --- a/rowers/templates/frontpage.html +++ b/rowers/templates/frontpage.html @@ -14,49 +14,6 @@

For Rowers. By Rowers.

- {% if user.is_anonymous %} -
  • -   -
  • -
  • -   -
  • -
  • - -

    SIGN UP FREE

    -
    -
  • -
  • -   -
  • -
  • -   -
  • -
  • -   -
  • -
  • -   -
  • -
  • -
    {% csrf_token %} - -

    Sign In

    - {{ form.as_p }} - -
    -
  • -
  • -   -
  • -
  • -   -
  • - {% endif %}
  • There is no shortage of training advice for rowers.

    @@ -67,10 +24,49 @@ you are, set objectives, make a plan, track progress, and adjust based on the results you are getting.

    -

    WHAT WE OFFER

    + +

    This site is more than a rowing log book. It enables you + and your coach + to plan and track all your rowing, indoor and on the water, with a large + number of devices and apps. On top of that, it offers the best in + rowing data analytics. Train smart.

  • +
  • +
    + horizontal line +
    +
  • + {% if user.is_anonymous %}
  • -   + +

    +
    SIGN UP FREE
    +

    +
    +
  • +
  • +
    {% csrf_token %} + +

    Sign In

    + Forgot password? + {{ form.as_p }} + +
    +
  • +
  • +
    + horizontal line +
    +
  • + {% endif %} +
  • +

    WHAT WE OFFER

  • LOG

    @@ -104,17 +100,8 @@

  • -   -
  • -
  • -   -
  • -
  • -   -
  • -
  • - -

    VIEW ALL

    +
    +

    and more

  • @@ -129,15 +116,15 @@ alt="horizontal line">
  • -
  • -

    - - Follow @rowsandall -

    -
  • +

    + + Follow @rowsandall +

    + +

    Local Time: {% now "jS F Y H:i" %}

    diff --git a/rowers/templates/menu_analytics.html b/rowers/templates/menu_analytics.html index cfcfa152..6d92023e 100644 --- a/rowers/templates/menu_analytics.html +++ b/rowers/templates/menu_analytics.html @@ -23,7 +23,7 @@
  • - +  Power Progress
  • diff --git a/rowers/templates/menu_workout.html b/rowers/templates/menu_workout.html index 01a2f1d8..7eb43a97 100644 --- a/rowers/templates/menu_workout.html +++ b/rowers/templates/menu_workout.html @@ -2,7 +2,7 @@

    Workout

    • - +
      • @@ -49,6 +49,11 @@
      • --> {% if user.is_authenticated and workout|may_edit:request %} +
      • + +  Upload Image + +
      •  Delete @@ -117,11 +122,6 @@
      • {% endif %} -
      • - -  Upload Image - -
    • diff --git a/rowers/templates/registration/login.html b/rowers/templates/registration/login.html index 4b4a1698..354a5918 100644 --- a/rowers/templates/registration/login.html +++ b/rowers/templates/registration/login.html @@ -1,39 +1,43 @@ -{% extends "basefront.html" %} +{% extends "newbasefront.html" %} -{% block content %} +{% block main %} {% if form.errors %}

      Your username and password didn't match. Please try again.

      {% endif %} -
      -{% csrf_token %} - - - - - - - - - - - - - - - - -
      {{ form.username.label_tag }}{{ form.username }}
      {{ form.password.label_tag }}{{ form.password }}
      Forgot password?
      - - - -
      - -

      - Follow @rowsandall -

      +
        +
      • +
        + {% csrf_token %} + + + + + + + + + + + + + + + + +
        {{ form.username.label_tag }}{{ form.username }}
        {{ form.password.label_tag }}{{ form.password }}
        Forgot password?
        + + + +
        +
      • +
      + +

      + Follow @rowsandall +

      {% endblock %} diff --git a/rowers/templates/summary_edit.html b/rowers/templates/summary_edit.html index d4de5063..62957cca 100644 --- a/rowers/templates/summary_edit.html +++ b/rowers/templates/summary_edit.html @@ -87,6 +87,38 @@

    • +
    • +

      Detailed Summary Edit

      +

      This is still experimental and there are known bugs. Use at your own risk. Nothing is stored permanently until you hit Save on the summary above. You can use the restore original button to restore the original values.

      +
      + + + + + + + + {% for i in nrintervals|times %} + + + + + + + {% endfor %} + +
      #TimeDistanceType
      {{ i }}  + {% get_field_id i "intervalt_" detailform %} + + {% get_field_id i "intervald_" detailform %} + + {% get_field_id i "type_" detailform %} +
      + {% csrf_token %} + + +
      +
    • Interval Shorthand How-To

      This is a quick way to enter the intervals using a special mini-language.

      diff --git a/rowers/views.py b/rowers/views.py index 0b761670..f3342eb2 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -4002,11 +4002,14 @@ def rankings_view2(request,theuser=0, velo = d/t p = 500./velo pwr = 2.8*(velo**3) - a = {'distance':int(d), - 'duration':timedeltaconv(t), - 'pace':timedeltaconv(p), - 'power':int(pwr)} - predictions.append(a) + try: + a = {'distance':int(d), + 'duration':timedeltaconv(t), + 'pace':timedeltaconv(p), + 'power':int(pwr)} + predictions.append(a) + except: + pass # CP model pwr = p1[0]/(1+t/p1[2]) @@ -11961,7 +11964,11 @@ def workout_summary_edit_view(request,id,message="",successmessage="" rowdata.updateintervaldata(ivalues,iunits,itypes,iresults=iresults) intervalstats = rowdata.allstats() row.summary = intervalstats - row.notes += "\n"+s + try: + row.notes += "\n"+s + except TypeError: + pass + row.save() rowdata.write_csv(f1,gzip=True) dataprep.update_strokedata(id,rowdata.df) diff --git a/static/css/frontstyles.css b/static/css/frontstyles.css index f41aaf4c..ff7c6da8 100644 --- a/static/css/frontstyles.css +++ b/static/css/frontstyles.css @@ -11,7 +11,6 @@ .wrapper > * { /* border: 2px solid #f08c00; */ border 0; - padding: 5px; } .wrapper nav { diff --git a/static/css/rowsandall2.css b/static/css/rowsandall2.css index 358440c6..84c31376 100644 --- a/static/css/rowsandall2.css +++ b/static/css/rowsandall2.css @@ -288,6 +288,14 @@ th.rotate > div > span { color: black; } +.frontitem label { + color: black; +} + +.frontitem a { + color: #1c75bc; +} + .vignet { border-radius: 50%; display: block;