Django Null Issues
This is a quick post to save people from the confusion I just went through…
Issue: Django raises a validation error for a blank field that is set to allow blank and/or null
Reason: This a gotcha. Although the models may be setup correctly, the validation error comes from the database. If you’ve added the null and/or blank attributes after a syncdb, then the database will still be setup to validate via the old model setup.
Solution: Recreate the model’s table or alter the specific field with SQL.
Hope this helps someone ![]()