Skip to content

Mentioning that '@detail_route' responds to GET only by default #4582

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

Merged

Conversation

Fa773NM0nK
Copy link
Contributor

Description

Small change to documentation for clarity.

@@ -51,7 +51,7 @@ This time we've used the `ModelViewSet` class in order to get the complete set o

Notice that we've also used the `@detail_route` decorator to create a custom action, named `highlight`. This decorator can be used to add any custom endpoints that don't fit into the standard `create`/`update`/`delete` style.

Custom actions which use the `@detail_route` decorator will respond to `GET` requests. We can use the `methods` argument if we wanted an action that responded to `POST` requests.
Custom actions which use the `@detail_route` decorator will, by default, respond to `GET` requests. We can use the `methods` argument if we wanted an action that responded to `POST` requests.
Copy link
Member

Choose a reason for hiding this comment

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

Could we instead phrase this as "Custom actions which use the @detail_route decorator will respond to GET requests by default"?

@Fa773NM0nK Fa773NM0nK force-pushed the Fa773NM0nK-tutorial6-enhancement-1 branch from fe71847 to 3d1bcf0 Compare October 16, 2016 07:54
@Fa773NM0nK
Copy link
Contributor Author

Done! Please have a look.

@tomchristie tomchristie merged commit d5e63d2 into encode:master Oct 18, 2016
@tomchristie
Copy link
Member

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.

2 participants