[Fixed]-Django ORM return None for not null columns

1👍

Seems your tables are created outside of Django. Django’s models.DateTimeField will synthesize into a datetime field in MySQL not timestamp.

Check this answer for an implementation similar to DateTimeField that uses timestamp at SQL level.

Leave a comment