Hi, In my models I want to have an optional field to a foreign key. I tried this:
field = models.ForeignKey(MyModel, null=True, blank=True, default=None) But i am getting this error: model.mymodel_id may not be NULL i am using sqlite edit: if it can help, here is the exception location: /usr/lib/python2.6/site-packages/django/db/backends/sqlite3/base.py in execute, line 200 so it's sqlite specific problem, i think. PS: i droped the whole table and synced before getting this error. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.