Skip to content

Conversation

@lynndotconfig
Copy link
Contributor

Description

to fix "@api_view" usage error in "docs/tutorial/5-relationships-and-hyperlinked-apis.md"

"@api_view" usage error.
@xordoquy
Copy link
Contributor

I don't really see what it fixes. Both tuple and lists should be valid.

@lynndotconfig
Copy link
Contributor Author

If it was only passed by "GET", list is safer then tuple and also can skip the comma.

@xordoquy
Copy link
Contributor

xordoquy commented Mar 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',])
Copy link
Contributor

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 lynndotconfig changed the title [FIX] "@api_view" calling error in docs/tutorial/5-relationships-and-hyperlinked-apis.md [change] using safer calling way of "@api_view" in docs/tutorial/5-relationships-and-hyperlinked-apis.md Mar 1, 2016
@lynndotconfig
Copy link
Contributor Author

Yes, for Python newcomers.

@xordoquy xordoquy added this to the 3.4.0 Release milestone Mar 1, 2016
xordoquy added a commit that referenced this pull request Mar 1, 2016
[change] using safer calling way of  "@api_view" in docs/tutorial/5-relationships-and-hyperlinked-apis.md
@xordoquy xordoquy merged commit c2cfb84 into encode:master Mar 1, 2016
@xordoquy
Copy link
Contributor

xordoquy commented Mar 1, 2016

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants