-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Document that dispatch should not be used for detail route method name #5636
Comments
Given that this applies to any method name in One option might be for us to link to http://www.cdrf.co/ in both the views and the viewsets documentation, perhaps? |
Following up here... https://twitter.com/_tomchristie/status/936177036703518720 |
Yeah, I understand why it has to be this way so anything that can enhance the documentation would be helpful IMHO. I am in favor of your proposition. |
Closes #5636 as per #5636 (comment)
Checklist
master
branch of Django REST framework.Steps to reproduce
Create a simple ViewSet with a detail route with method name
dispatch
Expected behavior
Not really sure here as it is colliding with the dispatch method under the hood of DFR
Actual behavior
The DRF router exhibits very odd behavior but does not function in any useful manor. It looks like the base path for the ViewSet is lost so all requests result in a 404.
I am not entirely sure what is going on but I can speculate that the detail route method is overlapping with the detail route method of the base ViewSet class. After looking deeper into DRF I understand why this is probably happening and why it probably can't easily be fixed. However, I think it would be fair to document this to say that a detail route method name should not be named
dispatch
.The text was updated successfully, but these errors were encountered: