cron job added if it wont work fck this
This commit is contained in:
@@ -46,18 +46,13 @@ class ProductImageSerailizer(serializers.ModelSerializer):
|
||||
|
||||
class ProductVariantSerialzier(serializers.ModelSerializer):
|
||||
product_attributes = AttributeValueSerialzier(many=True)
|
||||
price = serializers.SerializerMethodField()
|
||||
in_pack_items = InPackItemsSerialzier(many=True)
|
||||
images = ProductImageSerailizer(many=True)
|
||||
details = ProductDetailSerializer(many=True, read_only=True)
|
||||
class Meta:
|
||||
model = ProductVariant
|
||||
exclude = ('min_price', 'max_price','sell', 'currency', 'product')
|
||||
exclude = ('min_price', 'sell', 'currency', 'product', 'input_price')
|
||||
|
||||
def get_price(self, obj):
|
||||
dollor_price = self.context.get('dollor_price')
|
||||
toman_price = obj.get_toman_price(dollor_price=dollor_price)
|
||||
return "{:,.0f} تومان".format(toman_price)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user