Not sure if this will create the problem you describe, but I believe (and I could be wrong) that the 'verbose_name' argument is only used for ForeignKey, ManaytoMany, and OnetoOne fields (because the first argument must be a model class). I think that your descripcion field should look like this:
descripcion = models.CharField("descripción", max_length = 50, blank = True) Mind you, I am pretty new to Django, so don't take this as authoritative. Tom On Aug 15, 2:54 am, George Laskowsky <georgelaskow...@gmail.com> wrote: > I have the following code (simplified): > > # models.py > > class Historico(models.Model): > fechaCreacion = models.DateTimeField(auto_now_add=True) > fechaModificacion = models.DateTimeField(auto_now=True) > > class Meta: > abstract = True > > class Categoria(Historico): > nombre = models.CharField(max_length = 20) > descripcion = models.CharField(max_length = 50, blank = True, > verbose_name = 'descripción') > > def __unicode__(self): > return self.nombre > > class Meta: > ordering = ['nombre'] > > # forms.py > > class CategoriaForm(forms.ModelForm): > class Meta: > model = Categoria > > # views.py > [lots of code, variable 'data' is loaded with data from a file] > form = CategoriaForm( initial=data , prefix=str(idx) ) > if form.is_valid(): > [do something] > else: > [do another thing] > [/lots of code] > > The webpage shows the form populated with the data, BUT, is_valid() always > return false. I don't know what fails to validate, form.errors is empty. > > Thanks! > > P.S: thanks Margie for the last help. > > -- > George Laskowsky Ziguilinsky --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---