I have a django model class which have a field of 'amount' I used pip install django-moneyfield
install money field but I got an error when I run migration
My Code:
class Student(models.Model):
user = models.ForeignKey(CustomUser, on_delete = models.CASCADE)
fee = MoneyField(decimal_places = 2, max_digits = 8,
amount_default = Decimal("0"),
currency_default = "INR",
null = True, blank = True)
CodePudding user response:
the module django.forms.util
is an old module of django which has been renamed after django 1.7 in django.forms.utils
django-moneyfield is an old django module which is not maintenand from 2017. I think you can replaced it by django-money which is up-to-date
CodePudding user response:
the last release for django-moneyfield
package is in 2013.
Moneyfield requires:
Python ==3.3
Django ==1.5 (still working on 1.6 compatibility)
You can research an alternative package it seems this package is not supported anymore. You can use DjangoMoney instead.