Skip to content
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

TypeError: register() got an unexpected keyword argument 'base_name' #57

Open
zvyn opened this issue Feb 6, 2020 · 0 comments
Open

TypeError: register() got an unexpected keyword argument 'base_name' #57

zvyn opened this issue Feb 6, 2020 · 0 comments

Comments

@zvyn
Copy link

@zvyn zvyn commented Feb 6, 2020

Currently running ./test.sh fails with the following error:

TypeError: register() got an unexpected keyword argument 'base_name'

The reason is this change in the Django REST Framework released in version 3.9.0: "Deprecate the Router.register base_name argument in favor of basename" -- Release Notes

I'd propose the following fix for now:

  • allow both, base_name and basename for drf-schema-adapter routers
  • translate base_name to basename when passing kwargs to DRF
  • throw a ValueError when both base_name and basename are given

If that sounds good to you I can try to come up with a patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.