Hello! I've tried to do a makemigrations and a migrate but It returns "No changes detected" and "No migrations to apply". Sorry Vijay Khemlani, I forgot it, you have my code here:
forms.py: class PozosForm(forms.Form): codpozo = forms.CharField(max_length=20) coorx = forms.DecimalField(max_digits=13, decimal_places=5) coory = forms.DecimalField(max_digits=13, decimal_places=5) tipo = forms.CharField(max_length=20, required=False) cotatrapa = forms.DecimalField(max_digits=6, decimal_places=2, required=False) profundidad = forms.DecimalField(max_digits=6, decimal_places=2, required=False) cotafondo = forms.DecimalField(max_digits=6, decimal_places=2, required=False) material = forms.ChoiceField(choices=MATERIAL_POZOS, required=False) materialpates = forms.ChoiceField(choices=MATERIAL_PATES, required=False) diametro = forms.DecimalField(max_digits=20, decimal_places=2, required=False) largotrapa = forms.DecimalField(max_digits=20, decimal_places=2, required=False) seccionmayor = forms.DecimalField(max_digits=5, decimal_places=0, required=False) seccionmenor = forms.DecimalField(max_digits=5, decimal_places=0, required=False) numacometidas = forms.DecimalField(max_digits=2, decimal_places=0, required=False) models.py: class Pozo(models.Model): # gid_pozo = models.IntegerField(primary_key=True) # gid_colector = models.ForeignKey(Colector) codpozo = models.CharField(max_length=20) coorx = models.DecimalField(max_digits=13, decimal_places=5) coory = models.DecimalField(max_digits=13, decimal_places=5) tipo = models.CharField(max_length=20) cotatrapa = models.DecimalField(max_digits=6, decimal_places=2, blank=True, null=True) profundidad = models.DecimalField(max_digits=6, decimal_places=2, blank=True, null=True) cotafondo = models.DecimalField(max_digits=6, decimal_places=2, blank=True, null=True) material = models.CharField(max_length=20) materialpates = models.CharField(max_length=20) diametro = models.DecimalField(max_digits=20, decimal_places=2, blank=True, null=True) largotrapa = models.DecimalField(max_digits=20, decimal_places=2, blank=True, null=True) seccionmayor = models.DecimalField(max_digits=5, decimal_places=0, blank=True, null=True) seccionmenor = models.DecimalField(max_digits=5, decimal_places=0, blank=True, null=True) numacometidas = models.DecimalField(max_digits=2, decimal_places=0, blank=True, null=True) I think everything is ok, but if you find errors, please tell me. If not, I will try to use south. Thank you very much! El domingo, 16 de noviembre de 2014 18:51:43 UTC+1, elcaiaimar escribió: > > Hello everybody, I've a problem with DecimalField at Forms. I've a long > form in my template and I want to left some fields in blank. I've declared > these fields with > *required=False*, but when I submit the form I receive this error: '*This > value must be a decimal number*'. > > I've tried to declare *blank=True, null=True* in respective fields in > models.py and make a syncdb but it continues without works > > Does somebody know how could I solve this problem? > > Thank you very much! > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cc92e84d-d5da-4635-a365-a823ed83ecce%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.