迁移时出错。当我没有设置任何默认值时,我会收到错误
match = datetime_re.match(value)
TpyeError: expected string or buffer
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
当我设置默认设置或将其设为null=True
或blank=True
时,我收到错误The options auto_now, auto_now_add, and default are mutually exclusive. Only one of these options may be present
。好的,所以我应该删除它,但后来我遇到了上面的错误。
created_at = models.DateTimeField(auto_now_add=True, default=None)
updated_at = models.DateTimeField(auto_now=True, default=None)
感谢任何帮助