Skip to content

Commit

Permalink
Add phone number to CSV export fields
Browse files Browse the repository at this point in the history
  • Loading branch information
kz26 committed Oct 16, 2013
1 parent c196291 commit 47c9147
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uchicagohvz/game/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ class PlayerAdmin(admin.ModelAdmin):

def players_to_csv(ma, request, players):
response = HttpResponse(content_type='text/plain')
header = ['NAME', 'USERNAME', 'EMAIL', 'GAME', 'ACTIVE', 'DORM', 'RENTING_GUN', 'GUN_RETURNED']
header = ['NAME', 'USERNAME', 'EMAIL', 'PHONE_NUMBER', 'GAME', 'ACTIVE', 'DORM', 'RENTING_GUN', 'GUN_RETURNED']
response.write(','.join(header) + '\n')
for p in players.order_by('user__last_name', 'user__first_name'):
data = (
p.user.get_full_name(),
p.user.username,
p.user.email,
p.user.profile.phone_number,
p.game.name,
str(p.active),
p.get_dorm_display(),
Expand Down

0 comments on commit 47c9147

Please sign in to comment.