I am not sure this is possible, null=True is for the database, while blank=True is for form validation. Also there is a datatype None, there is no datatype blank. If you tried to assign blank as apposed to 'blank' to any variable within python it would complain. If there were not a named variable called blank it would tell you that 'blank is not defined', whilst it is easily accomplished to set something to None. Django is written in python and while it does some really cool things easily, it has not implemented a class called blank, afaik. -richard
On Sep 14, 1:41 pm, Xan <[EMAIL PROTECTED]> wrote: > Hi, > > Following the database API reference (http://www.djangoproject.com/ > documentation/db-api/): > > If a ForeignKey field has null=True set (i.e., it allows > NULL values), you can assign None to it. Example: > > e = Entry.objects.get(id=2) > e.blog = None > e.save() # "UPDATE blog_entry SET blog_id = NULL ...;" > > I want to know what is equivalent to Blank? That is, how to set > e.blog to blank if blank=True? > > Thanks, > Xan. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---