Add script to export member addresses
This commit is contained in:
parent
9b8102a542
commit
890fa996af
13
apiserver/export_member_addresses.py
Executable file
13
apiserver/export_member_addresses.py
Executable file
|
@ -0,0 +1,13 @@
|
|||
import django, sys, os
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'apiserver.settings'
|
||||
django.setup()
|
||||
|
||||
import csv
|
||||
from apiserver.api import models
|
||||
|
||||
members = models.Member.objects.all()
|
||||
|
||||
writer = csv.writer(sys.stdout)
|
||||
|
||||
for m in members:
|
||||
writer.writerow([m.id, m.first_name, m.last_name, m.street_address, m.city, m.postal_code])
|
Loading…
Reference in New Issue
Block a user