You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And have that appear as a url in the form of /users/4/stats and have the name be stats-aggregation.
It looks like it would only be a matter of adding another argument to the decorator function, binding that to the function object, then adding it as a kwarg to the route constructor (rather, the replace_methodname function).
I'd be willing to take a look at it myself, but I wanted to create an issue first to see if there's any interest or if that area of code is going to change significantly soon.
The text was updated successfully, but these errors were encountered:
In my humble opinion, since routers follow the principle of convention over configuration, having too many arguments on dynamic routes would give too broad of a public API. I think something like:
Given that the only use case I've seen for this is to allow underscored styles instead of hyphenated styles, it'd be better to see someone implement this in hypenated-routers pacakage or similar. The notes in #2010 detail how you'd do that, and we have extensive notes on rolling a third party package... http://www.django-rest-framework.org/topics/third-party-resources/
I was wondering if there was any plan to add this to DRF?
I'd like to be able to do something like this:
And have that appear as a url in the form of
/users/4/stats
and have the name bestats-aggregation
.It looks like it would only be a matter of adding another argument to the decorator function, binding that to the function object, then adding it as a kwarg to the route constructor (rather, the
replace_methodname
function).I'd be willing to take a look at it myself, but I wanted to create an issue first to see if there's any interest or if that area of code is going to change significantly soon.
The text was updated successfully, but these errors were encountered: