[Django]-Peculiar thing about leaving the DateTimeField empty in Django?

5👍

DateTimeFields don’t accept strings, they accept Python datetime objects. Or None, if set to allow blanks. The empty string isn’t a generic Python value for ‘no value’, so I’m not sure why you would expect it to autoconvert.

Leave a comment