Open
Description
Example:
class Profile(db.EmbeddedDocument):
login = db.StringField()
pw_hash = db.StringField()
admin = db.BooleanField()
class Users(db.Document):
_id = db.ObjectIdField()
stocks = db.DictField()
profile = db.EmbeddedDocumentField(Profile)
If I use exclude like this, then everything is OK:
from flask_mongoengine.wtf import model_form
form = model_form(Users, exclude=('profile__login'))(request.form)
And the form is generated without the field login.
But if I do like this:
form = model_form(Users, only=('profile__login'))(request.form)
Then nothing is generated.
I use flask-mongoengine Version 0.9.5
P.S.: Thanks to maintainers who support this project.