Hi everybody,
I know this was here before, but it is really a problem. We need (I literally mean need, not just want) a simple way to store NULL in database instead of ''. Using empty string has several serious consequences (in databases which distinguishes between NULL and '', which are to my knowledge all but oracle).
* You can't make a model with unique optional field. Django admin will let you store only one object without the value, because others with conflict the unique constraint.
* It is useless to set NOT NULL constraints on text fields. Because Django stores empty string as empty value, database will not complain about invalid data and just stores the rubbish.
I don't want to enforce anybody to use only NULL as empty value, I just want Django to store NULL in database when I told it to. And I don't mean the way of overriding all the form fields as I have to now.
Regards,
Vlastimil