Re: Default value for fields

2009-08-11 Thread AG
Thank you very much for all the responses. I found the source of the problem in my code. I was adding a property to Model Model.revision = property(fget=XXX, fset=YYY) which conflicted with the revision field I was having trouble with. Sorry for the confusion. Best, AG On Aug 10, 2:22 pm

Default value for fields

2009-08-10 Thread AG
I have a field: revision = models.IntegerField(default=0) on a model. I assumed that if I set a default value for a field, I am free to create an object that does not set 'revision', and save it. However, this produces an IntegrityError: IntegrityError: XXX.revision may not be NULL When I check