4 ms·
I've read the django docs. It's dumb advice parading as "best practice". The idea that empty string and none are equivalent is distasteful. Nobody makes this
by ninjapenguin54 6y ago
I've read the django docs. It's dumb advice parading as "best practice".
The idea that empty string and none are equivalent is distasteful.
Nobody makes this argument for int fields right?
"Just use 0"?
I hate having different conventions for different field types and losing a potentially meaningful distinction between empty string and 0.
The idea seems to be born out of truthy & falsey values. (A big source of gotchas and bugs in my experience)
I'd say it's the role of django forms to clean data into a normalized form. So converting null to empty string there might make sense.