i am having a unique kind of problem. i am putting "$90" value in my floatField. i assume it should be cleaned and stored as "90.0" in the model.
but when i input "$90" and call clean_filed method, it does not call that clean method. but when i apply the breakpoint on clean(self) mehthod and try to get its value, its says None.
please help me out. here is my code.
Model
class Project(models.Model):
foo = models.FloatField("foo",
null=True, blank=True
)
forms
widgets = {
'foo': forms.TextInput(attrs={'currency': 'true'})}
def clean_foo(self):
value = self.cleaned_data.get('foo')
print value # i get NONE here.............
return value