cron job added if it wont work fck this

This commit is contained in:
Parsa Nazer
2025-03-09 01:13:21 +03:30
parent 3a3706f1f9
commit 7c0c4329b1
13 changed files with 134 additions and 27 deletions
+1 -6
View File
@@ -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)