• request.json 需要改成 eval(request.data),请确认!谢谢。

  • 需要增加包,pip install mongoengine
    并导入 from mongoengine import *
    然后删除下面的
    task_id = db.StringField(required=True)
    title = db.StringField(required=True, max_length=50)
    description = db.StringField(required=True, max_length=1000)
    done = db.BooleanField(required=True)
    createtime = db.DateTimeField(required=True)
    completetime = db.DateTimeField()

    楼主是否漏掉了了?