check ur db table ,is null=true present.And in ur model write
revision = models.IntegerField(default=0,balnk=true,null=true)
and if u donont want to change the value from 0 at all then there is no need
to diplay it in fields

On Mon, Aug 10, 2009 at 11:29 PM, AG <anthony...@gmail.com> wrote:

>
> 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 the get_default value for this field, I get 0. Why is
> this field not set during a save()?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to