I am new to Django. I would have better grasp of this in Rails but am not familiar enough with all the libraries and converstions in Python / Django.
I have a model:
class Status(models.Model):
created = models.DatetimeField(auto_now_add=True)
This results in the format:
"created": "2017-01-06T22:21:51.531723Z"
I was hoping to see if before saving to the DB that it stores as a UNIX value?
This looked promising https://stackoverflow.com/a/34843855/3007294 but can't get it working. Every time I try to create a Status object, I get this error:
Datetime has wrong format. Use one of these formats instead: YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z].
My intentions are to not have to enter this every time a Status object is created.
Thanks -