Comments (4)
Happy to take pull requests - and if you are interested I'm looking for maintainers of this project
from flask-mongoengine.
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.
+1
from flask-mongoengine.
+1
from flask-mongoengine.
Related Issues (20)
- Mongo Debug Toolbar Panel: Update HTML view to enable scrolling
- Mongo Debug Toolbar Panel: Update HTML view to use wide screens
- Test database stays in place after tests!
- Add docs to new connection module #429 and new installation #475 HOT 1
- Migration to 2.0.0 documentation HOT 1
- Include Pillow as extra option for ImageField support?
- Ensure typing statements will not cause strong dependency on Flask-Debug Panel or WTForms
- Incompatibility with current flask version (2.2) HOT 7
- MongoEngine models Field missing HOT 2
- DecimalField: pass places to widget?
- New JSONProvider use of super() not quite right HOT 1
- AttributeError: type object 'Collection' has no attribute 'insert' HOT 3
- MongoEngine saving to a database called 'test' instead of database specified HOT 1
- Regarding new release HOT 8
- Config `db` cover host info
- after configuring database getting error mongoengine.connection.ConnectionFailure: You have not defined a default connection
- Failing debug_toolbar from subdomain (under https loads static files with http - blocked by browser) HOT 1
- Flask2.3.X JSONEncoder deprecated HOT 7
- This is a dead project - DO NOT USE HOT 7
- New Fork
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-mongoengine.