adding address to transactions
This commit is contained in:
@@ -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
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user