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

修改paddlecloud以便于PFSSever取得token #158

Closed
wants to merge 5 commits into from

Conversation

gongweibao
Copy link
Collaborator

No description provided.

@gongweibao gongweibao changed the title 修改paddlecloud以便于pfs取得token 修改paddlecloud以便于PFSSever取得token Jun 21, 2017
Copy link
Collaborator

@Yancey1989 Yancey1989 left a comment

Choose a reason for hiding this comment

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

This PR does not pass the CI, please reveiw

@@ -31,7 +31,7 @@
url(r"^api/v1/logs/", paddlejob.views.LogsView.as_view()),
url(r"^api/v1/workers/", paddlejob.views.WorkersView.as_view()),
url(r"^api/v1/quota/", paddlejob.views.QuotaView.as_view()),
url(r"^api/v1/file/", paddlejob.views.SimpleFileView.as_view()),
url(r"^api/v1/token2user/", paddlejob.views.GetUserView.as_view()),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why we delete the simplefile API?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

merge的时候出了点问题。非常感谢。
Done。


def get(self, request, format=None):
content = {
'user': unicode(request.user.username), # `django.contrib.auth.User` instance.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We use user's email as username all the time, and emails are strictly checked. Also using django's model values will return unicode typed strings by default.

So don't convert the type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@@ -44,6 +44,7 @@ def get(self, request, format=None):
}
return Response(content)


Copy link
Collaborator

Choose a reason for hiding this comment

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

What does this blank line do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@gongweibao gongweibao closed this Jul 21, 2017
@gongweibao gongweibao deleted the token2 branch August 21, 2017 08:18
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.

3 participants