add image field
This commit is contained in:
@@ -40,7 +40,7 @@ class SubCategorySerializer(serializers.ModelSerializer):
|
||||
parent = serializers.SerializerMethodField()
|
||||
class Meta:
|
||||
model = SubCategoryModel
|
||||
fields = ['id', 'name', 'slug','icon', 'meta_title', 'meta_description', 'product_count', 'show', 'parent']
|
||||
fields = ['id', 'name', 'slug','icon', 'meta_title', 'meta_description', 'product_count', 'show', 'parent', 'image']
|
||||
def get_product_count(self, obj):
|
||||
return obj.products.count()
|
||||
def get_parent(self, obj):
|
||||
|
||||
Reference in New Issue
Block a user