Django 没有正确的补偿和错误
错误->>>预期的字符串或字节,如对象 我知道这里面出了什么问题 models.py->Django 没有正确的补偿和错误,django,Django,错误->>>预期的字符串或字节,如对象 我知道这里面出了什么问题 models.py-> publish_date = models.DateTimeField(auto_now =True, auto_now_add = False, null =True) timestamp = models.DateTimeField( auto_now_add = True, ) updated = models.DateTimeField(auto_now =Tr
publish_date = models.DateTimeField(auto_now =True, auto_now_add = False, null =True)
timestamp = models.DateTimeField( auto_now_add = True, )
updated = models.DateTimeField(auto_now =True)
您不应同时使用
auto\u now
和auto\u now\u add
publish_date = models.DateTimeField(auto_now =True, null =True)
timestamp = models.DateTimeField(auto_now_add = True )
您不能同时使用auto_now和auto_now_add,因为它们是互斥的。
publish_date = models.DateTimeField(auto_now =True, null =True)
timestamp = models.DateTimeField( auto_now = True, )
updated = models.DateTimeField(auto_now =True)
您需要显示实际的错误消息和完整的回溯。错误不是来自此代码。