add created and updated to order list and detail

This commit is contained in:
Thomas Steen Rasmussen 2017-09-14 22:52:08 +02:00
parent 4c621aed4b
commit 21184c9c67

View file

@ -57,13 +57,18 @@ class TicketInline(admin.TabularInline):
@admin.register(models.Order)
class OrderAdmin(admin.ModelAdmin):
change_form_template = 'admin/change_order_form.html'
readonly_fields = ('paid',)
readonly_fields = (
'paid',
'created',
'updated',
)
def get_email(self, obj):
return obj.user.email
list_display = [
'id',
'created',
'user',
'get_email',
'total',