class MyModel(models.Model): user_name = models.CharField() created = models.DatedTimeField(auto_now_add=True) modified = models.DatedTimeField(autro_now=True)
当向表中插入数据或修改数据会自动插入时间
原文地址:https://www.cnblogs.com/lowmanisbusy/p/9125272.html
时间: 2024-11-11 09:59:42