I find that when I insert nothing of a string form field through a form it captures it as an empty string ''.
However when I insert nothing of an integer form field through a form it captures it as [null].
Is this good practice? Should the string be null as well in the db?
It is good practice. If strings were allowed to be
null, there would be two ways to have an empty string:nulland"". This gives you multiple values to check against, which is inefficient and messy.This is a Django convention, but is good practice in all applications, unless you have the need for
nullto mean something different than"".