GithubHelp home page GithubHelp logo

Comments (4)

rozza avatar rozza commented on July 28, 2024

Happy to take pull requests - and if you are interested I'm looking for maintainers of this project

from flask-mongoengine.

wojcikstefan avatar wojcikstefan commented on July 28, 2024

I agree that automatically adding a SubmitField could be nice. Otherwise in most situations you have to add it yourself manually in a template. What you could do right now is override flask_mongoengine.wtf.models.ModelForm, add a SubmitField to the overridden class and then call model_form(User, base_class=OverriddenModelClass).

WRT your 2nd point, you can easily change the field to PasswordField by calling model_form(User, field_args={'password': {'password': True}}). See field_args under http://docs.mongoengine.org/projects/flask-mongoengine/en/latest/#mongoengine-and-wtforms for more details.

@lafrech can you think of a reason (other than introducing a breaking change) why we shouldn't automatically add a SubmitField to every form generated with model_form? Basically it would automatically include an <input type="submit"> when rendering the form. One tricky thing about it though is that we'd probably need an extra argument passed into model_form (maybe via field_args) to define the value of the submit button, e.g. "save", "send", "confirm", etc.

from flask-mongoengine.

pierrz avatar pierrz commented on July 28, 2024

+1

from flask-mongoengine.

amovfx avatar amovfx commented on July 28, 2024

+1

from flask-mongoengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.