unknown column error fixed in data explore view
This commit is contained in:
@@ -50,7 +50,7 @@ from rowers.forms import (
|
||||
RaceResultFilterForm,PowerIntervalUpdateForm,FlexAxesForm,
|
||||
FlexOptionsForm,DataFrameColumnsForm,OteWorkoutTypeForm,
|
||||
MetricsForm,DisqualificationForm,disqualificationreasons,
|
||||
disqualifiers
|
||||
disqualifiers,SearchForm,
|
||||
)
|
||||
from django.core.urlresolvers import reverse, reverse_lazy
|
||||
|
||||
@@ -6994,6 +6994,9 @@ def workouts_view(request,message='',successmessage='',
|
||||
reduce(operator.and_,
|
||||
(Q(notes__icontains=q) for q in query_list))
|
||||
)
|
||||
searchform = SearchForm(initial={'q':query})
|
||||
else:
|
||||
searchform = SearchForm()
|
||||
|
||||
paginator = Paginator(workouts,20) # show 25 workouts per page
|
||||
page = request.GET.get('page')
|
||||
@@ -7038,6 +7041,7 @@ def workouts_view(request,message='',successmessage='',
|
||||
{'workouts': workouts,
|
||||
'active': 'nav-workouts',
|
||||
'rower':r,
|
||||
'searchform':searchform,
|
||||
'breadcrumbs':breadcrumbs,
|
||||
'dateform':dateform,
|
||||
'startdate':startdate,
|
||||
@@ -8496,10 +8500,16 @@ def workout_data_view(request, id=0):
|
||||
|
||||
datadf.sort_values(['ftime'],inplace=True)
|
||||
|
||||
datadf.drop(labels=[
|
||||
columns = datadf.columns.values
|
||||
|
||||
to_be_dropped = [
|
||||
'id','time','hr_an','hr_at','hr_bottom','hr_max',
|
||||
'hr_tr','hr_ut1','hr_ut2','x_right',
|
||||
],inplace=True,axis=1)
|
||||
]
|
||||
|
||||
to_be_dropped = [c for c in to_be_dropped if c in columns]
|
||||
|
||||
datadf.drop(labels=to_be_dropped,inplace=True,axis=1)
|
||||
|
||||
|
||||
cols = ['ftime','cumdist','fpace','spm',
|
||||
|
||||
Reference in New Issue
Block a user