-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use InputRequired
with explicit formdata
#13828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be good to go -- I've tested the forms manually to confirm that they're working with these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User testing: confirmed functionality here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User testing: confirmed functionality here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User testing: confirmed functionality here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User testing: confirmed functionality here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(After fixing up the password reset form.)
…3696) * DataRequired -> InputRequired Signed-off-by: Jack Leightcap <[email protected]> * `make translations` Signed-off-by: William Woodruff <[email protected]> * pyproject: exclude webob.* from mypy There's no current tracking issue for supporting type hints in WebOb. Signed-off-by: William Woodruff <[email protected]> * pyproject: tracking issue Signed-off-by: William Woodruff <[email protected]> * tests: mash a type into place Signed-off-by: William Woodruff <[email protected]> --------- Signed-off-by: Jack Leightcap <[email protected]> Signed-off-by: William Woodruff <[email protected]> Co-authored-by: William Woodruff <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]> Validated CreateMacaroonForm Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Edit: Whoops, you beat me to it 😅 |
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Head branch was pushed to by a user without write access
Tests were failing because of a form rename; I've removed the old tests (since they're now covered by |
Prefer
InputRequired
overDataRequired
See wtforms note:
This PR removes instances of
DataRequired
, and populates previously implicit data intoformdata
.Testing Changes
test_validate
that gives an example of a valid construction and validation.Functional Refactors
All constructions of form objects outside of the definitions in
forms.py
:warehouse/forklift/legacy.py
warehouse/manage/views/init.py
**self.request.POST
intoMultiDict
.DeleteMacaroon
field into theformdata
MultiDict
.warehouse/manage/init.py
request
, no change.warehouse/manage/views/organizations.py
default_response
-- this is partially initialized, later with areponse
object. This is a general pattern, I'm not sure why?request
, no change.warehouse/manage/views/teams.py
SaveTeamForm
.warehouse/accounts/views.py
**request.
first arg being wrapped in aMultiDict
.request.params
instead ofrequest.POST
onreset_password
?warehouse/views.py
SetLocaleForm
construction.warehouse/manage/views/init.py
**self.request.POST
inMultiDict
.warehouse/admin/views/users.py
UserForm
take a rawuser
object as the second arg?warehouse/admin/views/sponsors.py
SponsorForm
andsponsor
object.warehouse/admin/views/banners.py