Flask Mongoengine WTForms update#812
Merged
noirbizarre merged 12 commits intoopendatateam:devfrom Mar 3, 2017
noirbizarre:flask-mongoengine-wtf-update
Merged
Flask Mongoengine WTForms update#812noirbizarre merged 12 commits intoopendatateam:devfrom noirbizarre:flask-mongoengine-wtf-update
noirbizarre merged 12 commits intoopendatateam:devfrom
noirbizarre:flask-mongoengine-wtf-update
Conversation
davidbgk
approved these changes
Mar 2, 2017
|
|
||
| from flask_mongoengine.wtf.models import ModelForm as MEModelForm # noqa | ||
| from flask_wtf import Form as WTForm # noqa | ||
| from flask_wtf import FlaskForm # noqa |
Contributor
Author
There was a problem hiding this comment.
I was happy too to remove it but sadly this is here because of the mandatory early wtforms_json.init()
udata/tests/forms/test_uuid_field.py
Outdated
This was referenced Mar 3, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR supersedes #586, #654, #682 and #767 because they were dependent upgrades.
These PR have been merged into this one and all required fixes/refactorings applied:
flask_wtf.Formis nowflask_wtf.FlaskFormand has a little signature changeflask_mongoenginehas a new connection managerwtform-jsonuseStringFieldinstead of the deprecatedTextFieldwhich breaks everyStringFieldinstance (inherited or not) using default value (pending bug fix: Fixes (Python 3.6, tox, StringField default, latest versions...) kvesteri/wtforms-json#49), casting value to something else than a string or expectedNoneas defaultConsequence:
mongoengine.get_dbinstead of the removedflask_mongoengine.connection.get_dbNoneas default/empty, inheriting fromStringFieldbut returning another type or using a default value now useudata.forms.field.Fieldas base classForm(formdata, obj)calls are nowForm(formdata, obj=obj)