More ticket admin tweaks.

This commit is contained in:
Vidir Valberg Gudmundsson 2017-08-22 19:59:26 +02:00
parent c0159cfecb
commit 001bbd5dc0

View file

@ -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']