This commit is contained in:
@@ -373,12 +373,14 @@ class OrderAdmin(ModelAdmin):
|
||||
return f"[硬件] {obj.config.name}"
|
||||
if obj.course:
|
||||
return f"[课程] {obj.course.title}"
|
||||
if obj.activity:
|
||||
return f"[活动] {obj.activity.title}"
|
||||
return "未知商品"
|
||||
get_item_name.short_description = "购买商品"
|
||||
|
||||
fieldsets = (
|
||||
('订单信息', {
|
||||
'fields': ('config', 'course', 'quantity', 'total_price', 'status', 'created_at')
|
||||
'fields': ('config', 'course', 'activity', 'quantity', 'total_price', 'status', 'created_at')
|
||||
}),
|
||||
('客户信息', {
|
||||
'fields': ('customer_name', 'phone_number', 'shipping_address', 'wechat_user')
|
||||
|
||||
Reference in New Issue
Block a user