Skip to content
Discussion options

You must be logged in to vote

It would make sense to me if the url_path were hyphenated, but it isn't

I agree, as I prefer hyphens in URL paths, but I would argue that it's a bit subjective.

Instead, the url_name is hyphenated, which actually doesn't make sense to me

I think this is to be consistent with how the default ViewSet actions are named: basename-detail, basename-list... But, yes, that's a different convention that what Django chose for the contrib admin app, for example. Again it's subjective IMO, different people prefer different approaches here.

would be nice to have some settings for that

There is already a hook to customise this in user-land:

@action(detail=True, url_path="doing-something")
def doi…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by browniebroke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants