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

Configurable response messages #65

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

surajraktate
Copy link

I make changes in view.py to make responses configurable please review.

Copy link
Contributor

@anx-ckreuzberger anx-ckreuzberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR.

Your change is api-breaking, e.g.:
Instead of

return Response({'status': 'OK'})

you use

response_dict = dict({"status_code": None, "message": None})
message = get_response_message("PASSWORD_CHANGED")
response_dict.update({"status_code": 200, "message": message})

return Response(response_dict)

which results in the response {"status_code": 200, "message": "..."} instead of {"status": "OK"}.

Please re-introduce the "status" field.

django_rest_passwordreset/views.py Outdated Show resolved Hide resolved
@anx-ckreuzberger
Copy link
Contributor

Furthermore, please rename the PR accordingly, and add the "documentation" that is currently in Contributors.md into README.md within the configuration / settings section - e.g., with a heading Configurable Response.

@surajraktate surajraktate changed the title Add Suraj Raktate Contributors list Configurable response messages Aug 12, 2019
@surajraktate
Copy link
Author

Thanks for your PR.

Your change is api-breaking, e.g.:
Instead of

return Response({'status': 'OK'})

you use

response_dict = dict({"status_code": None, "message": None})
message = get_response_message("PASSWORD_CHANGED")
response_dict.update({"status_code": 200, "message": message})

return Response(response_dict)

which results in the response {"status_code": 200, "message": "..."} instead of {"status": "OK"}.

Please re-introduce the "status" field.

re-introduces the "status" field in #d7429b6 commit
d7429b6

Copy link
Author

@surajraktate surajraktate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done all requested change

…figurable-response

Django rest passwordreset configurable response
@ghost ghost requested review from anx-cbenke and removed request for anx-ckreuzberger July 27, 2020 10:23
Copy link
Contributor

@anx-cbenke anx-cbenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry the answer to your PR took so long! There are a few further change-requests, mainly about language. If these are adressed and all new conflicts are resolved, we can finally merge your PR.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
django_rest_passwordreset/views.py Outdated Show resolved Hide resolved
surajraktate and others added 2 commits February 11, 2021 10:08
Copy link
Contributor

@anx-cbenke anx-cbenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Thank you for the changes! There's one last merge-conflict that needs to be resolved - could you fix that too so we can finalize this?

@surajraktate
Copy link
Author

sorry for commit without testing, now I can see all checks passed, Thanks

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.

None yet

3 participants