I have a model as follows:
class Building(meta.Model):
survey_date = meta.DateField(null=True)
check_date = meta.DateField(null=True, blank=True)
researcher = meta.ForeignKey(Researcher)
....
I was hoping that this would let me have a blank check_date (which
would be stored as null) but enforce entry of a survey_date. But from
my admin page if I enter a survey_date (but leave the check_date blank)
I get the following on Save:
OperationalError at /admin/coils/buildings/add/
(1048, "Column 'check_date' cannot be null")
Request Method: POST
Request URL: http://81.3.86.154:8000/admin/coils/buildings/add/
Exception Type: OperationalError
Exception Value: (1048, "Column 'check_date' cannot be null")
Exception Location:
/usr/lib/python2.3/site-packages/MySQLdb/connections.py in
defaulterrorhandler, line 32
What have I missed?
Thank you,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---