📜  选项 auto_now、auto_now_add 和 default 是互斥的.可能只存在这些选项之一. - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.601000             🧑  作者: Mango

代码示例1
class Users(models.Model):
    ctime = models.DateTimeField(auto_now_add=True)
    uptime = models.DateTimeField(auto_now=True)


# It will work.
# Explanation:
# These both are mutually exclusive means you should use only one of them, not both.