unknown column error fixed in data explore view
This commit is contained in:
@@ -25,6 +25,10 @@ class LoginForm(forms.Form):
|
||||
username = forms.CharField()
|
||||
password = forms.CharField(widget=forms.PasswordInput())
|
||||
|
||||
# search form
|
||||
class SearchForm(forms.Form):
|
||||
q = forms.CharField(max_length=255,required=False,initial='Search')
|
||||
|
||||
# simple form for Contact page. Sends email to info@rowsandall.com
|
||||
class EmailForm(forms.Form):
|
||||
firstname = forms.CharField(max_length=255)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<tbody>
|
||||
{% for key, value in stats.items %}
|
||||
<tr>
|
||||
{% if value.std > 2 %}
|
||||
{% if value.std > 10 %}
|
||||
<td>{{ value.verbosename }}</td>
|
||||
<td>{{ value.mean|floatformat:0 }}</td>
|
||||
<td> {{ value.wmean|floatformat:0 }}</td>
|
||||
|
||||
@@ -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