Gary Wilson wrote: > using the example model: > > class Name(models.Model): > name = models.CharField(maxlength=100) > > when making a new Name object... >>>> a=Name() >>>> a.save() >>>> a > <Name: Name object> >>>> a.name > '' > > The name field does not have blank=True or null=True set, but yet I am > able to create a new Name object using no parameters (because > CharFields and children are defaluting to empty string). Is this the > intended behavior? >
hi, yes, (unfortunately) it is. the models do not validate their input. you will have to use a manipulator (Name.AddManipulator) to validate your input (and then save the object). making the models validation-aware is planned, but not done yet. gabor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---
