-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Handle "suffix" used in action decorator kwargs #6079
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
Conversation
With 0148a9f you would get a TypeError when using "suffix" in an action decorator. This might get improved to take suffix as a keyword argument already, defaulting to `None`.
Were you previously using I haven't fully thought this out, but my initial reaction is to just disallow the django-rest-framework/rest_framework/viewsets.py Lines 90 to 93 in 0148a9f
|
Yes.
We're using it in a mixin, so it is not trivial to use the full name there. |
That makes sense. I would say it's worth allowing then. |
Cool. |
Or do you think it should be added to the signature already? |
So there are some more difficulties with this. While the PR fixes the exception, there's still the discrepancy in name vs suffix. e.g., you'll notice that the dropdown uses the name, while the breadcrumbs use the suffix. I'm currently working on a fix. |
With 0148a9f you would get a TypeError when using "suffix" in an
action decorator.
This might get improved to take suffix as a keyword argument already,
defaulting to
None
.TODO:
/cc @rpkilby