Timestamp fields in django

前端 未结 4 1234
谎友^
谎友^ 2020-12-16 12:57

I have a MySQL database, right now I\'m generating all of the datetime fields as models.DateTimeField. Is there a way to get a timestamp instead? I

4条回答
  •  伪装坚强ぢ
    2020-12-16 13:20

    django-extensions has a useful TimeStampedModel: https://django-extensions.readthedocs.io/en/latest/model_extensions.html

提交回复
热议问题