add def get_email() to get email
This commit is contained in:
parent
731c7bd2a5
commit
fc077a43df
|
@ -39,10 +39,14 @@ class TicketInline(admin.TabularInline):
|
|||
@admin.register(models.Order)
|
||||
class OrderAdmin(admin.ModelAdmin):
|
||||
change_form_template = 'admin/change_order_form.html'
|
||||
|
||||
def get_email(self, obj):
|
||||
return obj.user.email
|
||||
|
||||
list_display = [
|
||||
'id',
|
||||
'user',
|
||||
'user__email',
|
||||
'get_email',
|
||||
'total',
|
||||
'payment_method',
|
||||
'open',
|
||||
|
|
Loading…
Reference in a new issue