Closed yuekui closed 2 years ago
What did you do to make this occur? I've tried locally editing tests/settings.py
with the REST_FRAMEWORK
block you mentioned and I'm not getting that error.
What did you do to make this occur? I've tried locally editing
tests/settings.py
with theREST_FRAMEWORK
block you mentioned and I'm not getting that error.
Try conftest.py
?
https://github.com/FJNR-inc/dry-rest-permissions/pull/26 should fix this
Hi @palfrey , @yuekui
From what I read here https://github.com/FJNR-inc/dry-rest-permissions/blob/8f2abbe20bd176fed09c2d8eab47ddcacc8fc3c4/dry_rest_permissions/generics.py#L32-L38
You should not use the class as is but instead inherit it like here:https://github.com/FJNR-inc/dry-rest-permissions/blob/8f2abbe20bd176fed09c2d8eab47ddcacc8fc3c4/README.md?plain=1#L319-L335
This way you should avoid getting the error. I will close this ticket but feel free to re-open it if needed.
If we set DRY Permissions and Filters as default rest_framework settings in
conftest.py
:There would be an error like:
Related change: https://github.com/FJNR-inc/dry-rest-permissions/pull/21 https://github.com/FJNR-inc/dry-rest-permissions/issues/18