Skip to content
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

Improved Handling of URLFor Parameters #199

Merged
merged 7 commits into from
Sep 28, 2020

Conversation

AlrasheedA
Copy link
Contributor

In response to issues #52 and #67

I followed the approach proposed by @tinproject here #52 (comment) and used values as the parameter name to be consistent with flask.url_for as suggested by @sloria here #52 (comment)

Since implementation does does not depend on the specific parameter names of flask.url_for nor marshmallow.fields.Field.__init__ it should work even if those APIs change. Additionally, checks have been included to ensure backward compatibility (the new field is ignored if it not used).

Kindly let me know if any changes are required.

Thank you

alrasheeda29 added 3 commits September 16, 2020 01:09
Add values argument to URLFOR and AbsoluteURLFor to separate between arguments
passed to flask.url_for and arguments passed to marshmallow.fields.Field.__init__
with checks to ensure backward compatibility.
Update the documentation to reflect the changes to URLFOR and
AbsoluteURLFor
Update the tests to reflect the changes to URLFor and
AbsoluteURLFor. Previous tests are kepts to test backward
compatiability
@sloria
Copy link
Member

sloria commented Sep 16, 2020

Thank you for the PR! I'll try to review/merge/release this if I can find some extra time this weekend.

@sloria sloria merged commit 21057fb into marshmallow-code:dev Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants