Merge branch 'release/v5.31'
This commit is contained in:
+3
-2
@@ -650,11 +650,11 @@ def create_row_df(r,distance,duration,startdatetime,
|
||||
|
||||
step = totalseconds/float(nr_strokes)
|
||||
|
||||
elapsed = np.arange(0,totalseconds+step,step)
|
||||
elapsed = np.arange(nr_strokes)*totalseconds/(float(nr_strokes-1))
|
||||
|
||||
dstep = distance/float(nr_strokes)
|
||||
|
||||
d = np.arange(0,distance+dstep,dstep)
|
||||
d = np.arange(nr_strokes)*distance/(float(nr_strokes-1))
|
||||
|
||||
unixtime = unixstarttime + elapsed
|
||||
|
||||
@@ -666,6 +666,7 @@ def create_row_df(r,distance,duration,startdatetime,
|
||||
else:
|
||||
power = 0
|
||||
|
||||
|
||||
df = pd.DataFrame({
|
||||
'TimeStamp (sec)': unixtime,
|
||||
' Horizontal (meters)': d,
|
||||
|
||||
@@ -236,7 +236,10 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
|
||||
dates.append(dd)
|
||||
durations.append(du)
|
||||
types.append(w.workouttype)
|
||||
try:
|
||||
rowers.append(w.user.user.first_name[0]+w.user.user.last_name[0])
|
||||
except IndexError:
|
||||
rowers.append(str(w.user))
|
||||
|
||||
try:
|
||||
d = utc.localize(startdate)
|
||||
|
||||
@@ -987,6 +987,14 @@ class UserForm(ModelForm):
|
||||
model = User
|
||||
fields = ['first_name','last_name','email']
|
||||
|
||||
def clean_first_name(self):
|
||||
first_name = self.cleaned_data.get('first_name')
|
||||
|
||||
if len(first_name):
|
||||
return first_name
|
||||
|
||||
raise forms.ValidationError('Please fill in your first name')
|
||||
|
||||
def clean_email(self):
|
||||
email = self.cleaned_data.get('email')
|
||||
|
||||
|
||||
@@ -3156,7 +3156,6 @@ def addmanual_view(request):
|
||||
)
|
||||
|
||||
|
||||
print name
|
||||
id,message = dataprep.create_row_df(r,
|
||||
distance,
|
||||
duration,startdatetime,
|
||||
|
||||
@@ -229,20 +229,21 @@ PROGRESS_CACHE_SECRET = CFG['progress_cache_secret']
|
||||
# Concept 2
|
||||
C2_CLIENT_ID = CFG['c2_client_id']
|
||||
C2_CLIENT_SECRET = CFG['c2_client_secret']
|
||||
C2_REDIRECT_URI = "http://rowsandall.com/call_back"
|
||||
C2_REDIRECT_URI = CFG['c2_callback']
|
||||
#C2_REDIRECT_URI = "http://localhost:8000/call_back"
|
||||
|
||||
# Strava
|
||||
|
||||
STRAVA_CLIENT_ID = CFG['strava_client_id']
|
||||
STRAVA_CLIENT_SECRET = CFG['strava_client_secret']
|
||||
STRAVA_REDIRECT_URI = "http://rowsandall.com/stravacall_back"
|
||||
STRAVA_REDIRECT_URI = CFG['strava_callback']
|
||||
|
||||
|
||||
# SportTracks
|
||||
|
||||
SPORTTRACKS_CLIENT_ID = CFG['sporttracks_client_id']
|
||||
SPORTTRACKS_CLIENT_SECRET = CFG['sporttracks_client_secret']
|
||||
SPORTTRACKS_REDIRECT_URI = "http://rowsandall.com/sporttracks_callback"
|
||||
SPORTTRACKS_REDIRECT_URI = CFG['sporttracks_callback']
|
||||
|
||||
# Runkeeper
|
||||
|
||||
|
||||
@@ -117,7 +117,11 @@
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
{% if user.first_name %}
|
||||
<a class="button gray small" href="/rowers/me/edit">{{ user.first_name }}</a>
|
||||
{% else %}
|
||||
<a class="button gray small" href="/rowers/me/edit">{{ user }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<span class="tooltiptext">Edit user account, e.g. heart rate zones, power zones, email, teams</span>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user