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.