diff --git a/requirements.txt b/requirements.txt index 55d80f51..0d26c20e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -67,7 +67,6 @@ Faker==1.0.4 fitparse==1.1.0 Flask==1.0.2 future==0.17.1 -#GDAL==2.3.3 geocoder==1.38.1 geos==0.2.1 holoviews==1.11.3 @@ -109,6 +108,7 @@ mistune==0.8.4 mock==2.0.0 more-itertools==6.0.0 mpld3==0.3 +mysqlclient==1.4.2.post1 nbconvert==5.4.1 nbformat==4.4.0 nose==1.3.7 @@ -160,7 +160,7 @@ ratelim==0.1.6 redis==3.2.1 requests==2.21.0 requests-oauthlib==1.2.0 -rowingdata==2.4.4 +rowingdata==2.5.1 rowingphysics==0.5.0 rq==0.13.0 scipy==1.2.1 @@ -192,7 +192,6 @@ wcwidth==0.1.7 webencodings==0.5.1 Werkzeug==0.15.1 widgetsnbextension==3.4.2 -#winkerberos==0.7.0 xlrd==1.2.0 xmltodict==0.12.0 yamjam==0.1.7 diff --git a/rowers/braintreestuff.py b/rowers/braintreestuff.py index 9182a94d..45f08c85 100644 --- a/rowers/braintreestuff.py +++ b/rowers/braintreestuff.py @@ -385,6 +385,7 @@ def get_transactions(start_date,end_date): amounts = [] countries = [] + addresses = [] card_countries = [] names = [] emails = [] @@ -408,6 +409,10 @@ def get_transactions(start_date,end_date): if rs: r = rs[0] countries.append(r.country) + addresses.append('{street}, {city}, {postal_code}'.format( + street = r.street_address, + city = r.city, + postal_code = r.postal_code)) ownids.append(r.id) usernames.append(r.user.username) @@ -416,6 +421,7 @@ def get_transactions(start_date,end_date): transaction.credit_card_details.country_of_issuance) ownids.append('unknown') usernames.append('unknown') + addresses.append('') emails.append(transaction.customer_details.email) @@ -448,7 +454,8 @@ def get_transactions(start_date,end_date): 'user_id':ownids, 'customer_id':customerids, 'transaction_id':transactionids, - 'subscription_id':subscriptionids + 'subscription_id':subscriptionids, + 'address':addresses } ) diff --git a/rowers/tests/testdata/testdata.csv.gz b/rowers/tests/testdata/testdata.csv.gz index 7b927225..4c5a20d0 100644 Binary files a/rowers/tests/testdata/testdata.csv.gz and b/rowers/tests/testdata/testdata.csv.gz differ diff --git a/rowers/views/apiviews.py b/rowers/views/apiviews.py index 7c8c16d5..e7dd3533 100644 --- a/rowers/views/apiviews.py +++ b/rowers/views/apiviews.py @@ -150,10 +150,9 @@ def strokedatajson(request,id): 'peakforceangle':peakforceangle, }) - # Following part should be replaced with dataprep.new_workout_from_df r = getrower(request.user) - + timestr = row.startdatetime.strftime("%Y%m%d-%H%M%S") csvfilename ='media/Import_'+timestr+'.csv' diff --git a/rowers/views/statements.py b/rowers/views/statements.py index 5dd22c60..b3a0745f 100644 --- a/rowers/views/statements.py +++ b/rowers/views/statements.py @@ -101,7 +101,9 @@ from rowers.models import ( RowerPowerZonesForm,AccountRowerForm,UserForm,StrokeData, Team,TeamForm,TeamInviteForm,TeamInvite,TeamRequest, WorkoutComment,WorkoutCommentForm,RowerExportForm, - CalcAgePerformance,PowerTimeFitnessMetric,PlannedSessionForm, + CalcAgePerformance, + PowerTimeFitnessMetric, + PlannedSessionForm, PlannedSessionFormSmall,GeoCourseEditForm,VirtualRace, VirtualRaceForm,VirtualRaceResultForm,RowerImportExportForm, IndoorVirtualRaceResultForm,IndoorVirtualRaceResult, diff --git a/rowsandall_app/urls.py b/rowsandall_app/urls.py index a126129b..24ee7a28 100644 --- a/rowsandall_app/urls.py +++ b/rowsandall_app/urls.py @@ -58,10 +58,10 @@ urlpatterns += [ re_path(r'^getblogs/$',rowersviews.get_blog_posts), re_path(r'^login/', # auth_views.LoginView, - auth_views.LoginView, + auth_views.LoginView.as_view(), name='login'), re_path(r'^logout/$', - auth_views.LogoutView, + auth_views.LogoutView.as_view(), {'next_page': '/'}, name='logout',), re_path(r'^rowers/',include('rowers.urls')),