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

Use serializier from djangorestframework for api. #723

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dzhuang
Copy link
Contributor

@dzhuang dzhuang commented Jul 26, 2020

Fix #719 .

@dzhuang dzhuang force-pushed the rest_serializer branch 3 times, most recently from fdae2ef to f12972e Compare July 26, 2020 10:15
@dzhuang dzhuang requested a review from joshuata July 26, 2020 10:18
Comment on lines +131 to +135
def get_percentage(self, obj):
if obj.correctness is not None:
return 100 * obj.correctness
else:
return None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to make this a read-only property on the FlowPageVisitGrade class instead of the serializer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your review. What's your opinion? @inducer

Copy link
Collaborator

@joshuata joshuata left a comment

Choose a reason for hiding this comment

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

It looks good to me. I only had the one piece of feedback, and it's not blocking

Base automatically changed from master to main March 8, 2021 02:16
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.

Migrate API to django REST
2 participants