From 001bbd5dc02fb75597a197e80593138a95f3091e Mon Sep 17 00:00:00 2001 From: Vidir Valberg Gudmundsson Date: Tue, 22 Aug 2017 19:59:26 +0200 Subject: [PATCH] More ticket admin tweaks. --- src/tickets/admin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tickets/admin.py b/src/tickets/admin.py index b5761416..d4fe0982 100644 --- a/src/tickets/admin.py +++ b/src/tickets/admin.py @@ -41,6 +41,7 @@ class SponsorTicketAdmin(BaseTicketAdmin): ] list_filter = [ + 'ticket_type__camp', 'checked_in', 'ticket_type', 'sponsor', @@ -56,8 +57,12 @@ class DiscountTicketAdmin(BaseTicketAdmin): @admin.register(ShopTicket) class ShopTicketAdmin(BaseTicketAdmin): + def user_email(self, obj): + return obj.order.user.email + list_display = [ 'pk', + 'user_email', 'ticket_type', 'order', 'product', @@ -72,4 +77,4 @@ class ShopTicketAdmin(BaseTicketAdmin): 'product', ] - search_fields = ['order__id', 'name', 'email'] + search_fields = ['pk', 'order__id', 'name', 'email']