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)
|
@admin.register(models.Order)
|
||||||
class OrderAdmin(admin.ModelAdmin):
|
class OrderAdmin(admin.ModelAdmin):
|
||||||
change_form_template = 'admin/change_order_form.html'
|
change_form_template = 'admin/change_order_form.html'
|
||||||
|
|
||||||
|
def get_email(self, obj):
|
||||||
|
return obj.user.email
|
||||||
|
|
||||||
list_display = [
|
list_display = [
|
||||||
'id',
|
'id',
|
||||||
'user',
|
'user',
|
||||||
'user__email',
|
'get_email',
|
||||||
'total',
|
'total',
|
||||||
'payment_method',
|
'payment_method',
|
||||||
'open',
|
'open',
|
||||||
|
|
Loading…
Reference in a new issue