Closed tobych closed 12 years ago
Hi. Look for "fill_nullable_fields" in https://github.com/paulocheque/django-dynamic-fixture/wiki/Documentation
You can change the default behavior of DDF globally or just for one scenario.
DDF_FILL_NULLABLE_FIELDS = True instance = G(MyModel, fill_nullable_fields=False)
Thanks for the explanation. I'm surprised this is the default, but it makes sense now. Ta!
I have a model with this field:
To my surprise, DDF sets this field with a date when instantiating the model. I was expecting it to leave it blank, because it can be, and that's what Django would do, even though it doesn't explicitly set
default=None
. I had to do that to avoid this happening:Is this supposed to be happening? Should I be including explicit defaults in all my nullable fields?