We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A class inheriting ReadWriteScopedResourceMixin (or ReadWriteScopedResourceView) , like this one
ReadWriteScopedResourceMixin
ReadWriteScopedResourceView
class A(ReadWriteScopedResourceMixin): def __init__(self, *args, **kwargs): self.args = args self.kwargs = kwargs return super().__init__(*args, **kwargs)
It is possible to instantiate it without parameters a = A(), but raises a TypeError with parameters
a = A()
>>> a = A(True, bar=foo) TypeError: object() takes no parameters
In particular, this makes the classes incompatible with DRF viewsets
File ".../python3.6/site-packages/rest_framework/viewsets.py", line 70, in view self = cls(**initkwargs) File ".../python3.6/site-packages/oauth2_provider/views/mixins.py", line 239, in __new__ return super(ReadWriteScopedResourceMixin, cls).__new__(cls, *args, **kwargs)
I believe this is due to oauth2_provider/views/mixins.py line 239, the call
oauth2_provider/views/mixins.py
return super(ReadWriteScopedResourceMixin, cls).__new__(cls, *args, **kwargs)
should be
return super(ReadWriteScopedResourceMixin, cls).__new__(cls)
I use django-oauth-toolkit v 0.12.0, python 3.6, django 1.11.16 and drf 3.4.7
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A class inheriting
ReadWriteScopedResourceMixin
(orReadWriteScopedResourceView
) , like this oneIt is possible to instantiate it without parameters
a = A()
, but raises a TypeError with parametersIn particular, this makes the classes incompatible with DRF viewsets
I believe this is due to
oauth2_provider/views/mixins.py
line 239, the callshould be
I use django-oauth-toolkit v 0.12.0, python 3.6, django 1.11.16 and drf 3.4.7
The text was updated successfully, but these errors were encountered: