Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
[change] using safer calling way of "@api_view" in docs/tutorial/5-relationships-and-hyperlinked-apis.md#3971
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
"@api_view" usage error.
xordoquy commentedFeb 29, 2016
I don't really see what it fixes. Both tuple and lists should be valid. |
lynndotconfig commentedMar 1, 2016
If it was only passed by "GET", list is safer then tuple and also can skip the comma. |
xordoquy commentedMar 1, 2016
ok, so it's not a fix in itself, just a change to make it safer for Python newcomers. |
| @api_view(('GET',)) | ||
| @api_view(['GET',]) |
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.
Can you remove the coma here to avoid confusion with tuples ?
remove comma
lynndotconfig commentedMar 1, 2016
Yes, for Python newcomers. |
[change] using safer calling way of "@api_view" in docs/tutorial/5-relationships-and-hyperlinked-apis.md
xordoquy commentedMar 1, 2016
Thanks ! |
Description
to fix "@api_view" usage error in "docs/tutorial/5-relationships-and-hyperlinked-apis.md"