add created and updated to order list and detail
This commit is contained in:
parent
4c621aed4b
commit
21184c9c67
|
@ -57,13 +57,18 @@ 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'
|
||||||
readonly_fields = ('paid',)
|
readonly_fields = (
|
||||||
|
'paid',
|
||||||
|
'created',
|
||||||
|
'updated',
|
||||||
|
)
|
||||||
|
|
||||||
def get_email(self, obj):
|
def get_email(self, obj):
|
||||||
return obj.user.email
|
return obj.user.email
|
||||||
|
|
||||||
list_display = [
|
list_display = [
|
||||||
'id',
|
'id',
|
||||||
|
'created',
|
||||||
'user',
|
'user',
|
||||||
'get_email',
|
'get_email',
|
||||||
'total',
|
'total',
|
||||||
|
|
Loading…
Reference in a new issue