diff --git a/rowers/forms.py b/rowers/forms.py index e45bdf84..71c93283 100644 --- a/rowers/forms.py +++ b/rowers/forms.py @@ -481,6 +481,20 @@ class MyTimeField(forms.TimeField): super(MyTimeField, self).__init__(*args, **kwargs) supports_microseconds = True +# Form used to automatically define intervals by pace or power +class PowerIntervalUpdateForm(forms.Form): + selectorchoices = ( + ('power','Power'), + ('pace','Pace') + ) + + pace = forms.DurationField(label='Pace',required=False) + power = forms.IntegerField(label='Power',required=False) + selector = forms.ChoiceField(choices=selectorchoices, + required=True, + initial='power', + label='Use') + # Form used to update interval stats class IntervalUpdateForm(forms.Form): diff --git a/rowers/templates/summary_edit.html b/rowers/templates/summary_edit.html index 08322e00..59510b18 100644 --- a/rowers/templates/summary_edit.html +++ b/rowers/templates/summary_edit.html @@ -8,200 +8,220 @@ {% block content %}
- Please correct the error{{ form.errors|pluralize }} below. -
- {% endif %} + {% if form.errors %} ++ Please correct the error{{ form.errors|pluralize }} below. +
+ {% endif %} -- Edit -
-- Workflow View +
+ Edit +
++ Workflow View -
-- Advanced -
- Advanced Functionality (More interactive Charts) - -+ Advanced +
+ Advanced Functionality (More interactive Charts) + +| Date/Time: | {{ workout.startdatetime }} | -||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Distance: | {{ workout.distance }}m | -||||||||||||||||
| Duration: | {{ workout.duration |durationprint:"%H:%M:%S.%f" }} | -||||||||||||||||
| Public link to this workout | -
+ {% localtime on %}
+
Interval Translator-This is a quick way to enter the intervals using a special mini-language. -You enter something like 8x500m/3min, press "Update" and the site will interpret this for you and update the summary on the right. If you're happy with the result, press the green Save button to update the values. Nothing will be changed permanently until you hit Save. + | + |
This is a quick way to enter the intervals using a special mini-language.
+You enter something like 8x500m/3min, press "Update" and the site will interpret this for you and update the summary on the right. If you're happy with the result, press the green Save button to update the values. Nothing will be changed permanently until you hit Save.
+ +Special characters are x (times), + and / (denotes a rest interval), as well as ( and ). Units are min (minutes), sec (seconds), m (meters) and km (km).
+ +A typical interval is described as "10min/5min", with the work part before the "/" and the rest part after it. A zero rest can be omitted, so a single 1000m piece could be described either as "1km" or "1000m". The basic units can be combined with "+" and "Nx". You can use parentheses as in the example below.
+ +Here are a few examples.
+| 8x500m/2min | 8 times 500m with 2 minutes rest | +
| 10km | Single distance of 10km | +
| 6min/3min + 5min/3min + 3min/3min + 3min | +Four intervals of 6, 5, 3 and 3 minutes length, 3 minutes rest | +
| 8x500m/3:30min | +8 times 500m with 3 minutes 30 seconds rest | +
| 4x((500m+500m)/5min) | 4 times 1km, but each km is reported as two 500m intervals without rest. Note the nested parentheses. | +
| 2x500m/500m | A 2k rowed as 500m "on", 500m "off" | +
Special characters are x (times), + and / (denotes a rest interval), as well as ( and ). Units are min (minutes), sec (seconds), m (meters) and km (km).
+ -A typical interval is described as "10min/5min", with the work part before the "/" and the rest part after it. A zero rest can be omitted, so a single 1000m piece could be described either as "1km" or "1000m". The basic units can be combined with "+" and "Nx". You can use parentheses as in the example below.
+Here are a few examples.
-| 8x500m/2min | 8 times 500m with 2 minutes rest | -
| 10km | Single distance of 10km | -
| 6min/3min + 5min/3min + 3min/3min + 3min | -Four intervals of 6, 5, 3 and 3 minutes length, 3 minutes rest | -
| 8x500m/3:30min | -8 times 500m with 3 minutes 30 seconds rest | -
| 4x((500m+500m)/5min) | 4 times 1km, but each km is reported as two 500m intervals without rest. Note the nested parentheses. | -
| 2x500m/500m | A 2k rowed as 500m "on", 500m "off" | -
With this form, you can specify a power or pace level. Everything faster/harder than the + specified pace/power will become a work interval. Everything slower will become a rest + interval. +
- + + +-
-{{ intervalstats }}
-
-
- 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.
-+
+ {{ intervalstats }}
+
+
+ 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.
+