How can I set a default value for FloatField in django.
Initially when I had created the model and declared the float field as:
cost = models.FloatField(null=True, blank=True)
and db also created successfully through south migration.
But now when I am trying to do edit on that field using the html form, and no value is entered in the cost field, in the form its throwing value error.
Thus I think if I can set a default value for cost field it may fix the problem.
But I don't know how to set a default value for FloatField in django.
cost = models.FloatField(null=True, blank=True, default=0.0)work?