mirumee / django-prices

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

AmountField value not displaying in admin form Field #51

Closed dedayoa closed 6 years ago

dedayoa commented 6 years ago

I'm running djangoprices (and prices) ver 1.0.0b2 on Django1.11.9. Upon saving an object and trying to edit in admin, all AmountField are empty. Inspecting the html code, I see that it looks like <input type="number" name="s_price_net" value="Amount('5.00', 'NGN')" step="any" required="" id="id_s_pricenet"> Is this a bug? Any help will be appreciated.

dedayoa commented 6 years ago

https://github.com/mirumee/django-prices/pull/52 fixes the above issue.

Think https://github.com/mirumee/django-prices/blob/67bd17b525378c86b6ed09bda13d6a9e1bc41693/django_prices/widgets.py#L26 would cause a similar problem, if it were used in the template.

rafalp commented 6 years ago

Fixed in #53