以下 Python 代码会产生错误:
class Post(models.Model):
author = models.CharField(max_length=40,blank=False,default="")
title = models.CharField(max_length=100,blank=False,default="")
content = models.TextField(blank=False,default="")
# status = models.CharField(max_length=100,blank=False,default="draft")
published = models.BooleanField(default = False)
date_created = models.DateTimeField()
date_modified = models.DateTimeField()
def save(self):
if self.date_created == None:
self.date_created = datetime.now()
self.date_modified = datetime.now()
super(Post, self).save()
这是我收到的错误消息。
raise DeserializationError(e)
我试过的:
在 suncdb 上它会引发错误
我的问题:
我该如何解决?