|
|
@@ -65,9 +65,10 @@ class ModelImageInfoAdmin(DeleteModelAdmin, admin.ModelAdmin):
|
65
|
65
|
|
66
|
66
|
|
67
|
67
|
class DistributorInfoAdmin(DeleteModelAdmin, admin.ModelAdmin):
|
68
|
|
- list_display = ('brand_id', 'brand_name', 'distributor_id', 'distributor_name', 'distributor_descr', 'distributor_province_code', 'distributor_province_name', 'position', 'status', 'created_at', 'updated_at')
|
69
|
|
- list_filter = ('brand_name', 'status')
|
|
68
|
+ list_display = ('brand_id', 'brand_name', 'distributor_id', 'distributor_name', 'distributor_province_code', 'distributor_province_name', 'position', 'status', 'created_at', 'updated_at')
|
|
69
|
+ list_filter = ('brand_name', 'distributor_province_name', 'status')
|
70
|
70
|
readonly_fields = ('distributor_province_code', )
|
|
71
|
+ search_fields = ('brand_id', 'brand_name', 'distributor_name', 'distributor_descr', 'distributor_province_code', 'distributor_province_name')
|
71
|
72
|
|
72
|
73
|
def save_model(self, request, obj, form, change):
|
73
|
74
|
obj.brand_id = strip(obj.brand_id)
|