mirumee / django-prices

Django fields for the prices module
158 stars 53 forks source link

drf serializers Invalid literal for Decimal: u"Price('49.69', currency=u'USD')" #43

Open slukin1 opened 7 years ago

slukin1 commented 7 years ago

Invalid literal for Decimal: u"Price('49.69', currency=u'USD')"

class Product(models.Model): price = PriceField('Price', currency='BTC', max_digits=12, decimal_places=2)

class ProductSerializer(serializers.ModelSerializer): class Meta: model = Product view_name = 'item-detail' fields = 'all'