|
|
@@ -63,10 +63,10 @@ class BrandInfoAdmin(admin.ModelAdmin):
|
63
|
63
|
|
64
|
64
|
|
65
|
65
|
class ModelInfoAdmin(admin.ModelAdmin):
|
66
|
|
- list_display = ('brand_id', 'brand_name', 'jancode', 'model_id', 'model_uni_name', 'model_name', 'model_full_name', 'model_descr', 'category', 'warehouse', 'image', 'url', 'factory_yuan', 'integral', 'position', 'display', 'status', 'created_at', 'updated_at')
|
|
66
|
+ list_display = ('brand_id', 'brand_name', 'jancode', 'model_id', 'model_name', 'model_uni_name', 'model_full_name', 'model_descr', 'category', 'warehouse', 'image', 'url', 'factory_yuan', 'integral', 'position', 'display', 'status', 'created_at', 'updated_at')
|
67
|
67
|
list_filter = ('brand_name', 'category', 'warehouse', 'display', 'status')
|
68
|
68
|
readonly_fields = ('brand_name', 'factory_fee')
|
69
|
|
- search_fields = ('brand_id', 'brand_name', 'jancode', 'model_id', 'model_uni_name', 'model_name', 'model_full_name', 'model_descr', 'category', 'warehouse')
|
|
69
|
+ search_fields = ('brand_id', 'brand_name', 'jancode', 'model_id', 'model_name', 'model_uni_name', 'model_full_name', 'model_descr', 'category', 'warehouse')
|
70
|
70
|
|
71
|
71
|
def save_model(self, request, obj, form, change):
|
72
|
72
|
obj.brand_id = strip(obj.brand_id)
|