summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--workshop_app/admin.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/workshop_app/admin.py b/workshop_app/admin.py
index a28cdb3..40d496f 100644
--- a/workshop_app/admin.py
+++ b/workshop_app/admin.py
@@ -14,7 +14,8 @@ except ImportError:
#Custom Classes
class ProfileAdmin(admin.ModelAdmin):
- list_display = ['title','user', 'institute','location','department','phone_number','position']
+ list_display = ['title','user', 'institute','location','department',
+ 'phone_number','position']
list_filter = ['position', 'department']
actions = ['download_csv']
@@ -25,11 +26,13 @@ class ProfileAdmin(admin.ModelAdmin):
filename=profile_data.csv'
writer = csv.writer(response)
- writer.writerow(['title','user', 'institute', 'location','department','phone_number',
- 'position'])
+ writer.writerow(['title','username', 'first_name', 'last_name',
+ 'institute', 'location', 'department',
+ 'phone_number', 'position'])
for q in queryset:
- writer.writerow([q.title, q.user, q.institute,
+ writer.writerow([q.title, q.user, q.user.first_name,
+ q.user.last_name, q.institute,
q.location, q.department, q.phone_number,
q.position])