Mongoengine: TypeError: __init__() got an unexpected keyword argument

后端 未结 4 2028
我在风中等你
我在风中等你 2020-12-19 20:43

I am using flask-mongoengine extension and I have a User class like this:

class User(db.Document, UserMixin):     
    email = db.StringField(max_length=120,         


        
4条回答
  •  鱼传尺愫
    2020-12-19 21:24

    I know what happened on you code. you should use __str__ instead of using __init__ I have the same problem .now I have solved it . hope I can help you !

提交回复
热议问题