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
Determine if a function is a result of a CBV as_view() call.
"""
returnhasattr(func, "view_class")
This isn't compatible with DRF's views (via browsable API) because of the extra processing in DRF's APIView and ViewSetMixin; it is possible by checking the cls attribute but we need to make sure there aren't any side effects with other DRF things like the wrapped request/response objects.
The text was updated successfully, but these errors were encountered:
Currently the cbv check consists of an attribute check on the view function:
django-cbv-inspect/cbv_inspect/utils.py
Lines 86 to 90 in fad3cc9
This isn't compatible with DRF's views (via browsable API) because of the extra processing in DRF's APIView and ViewSetMixin; it is possible by checking the
cls
attribute but we need to make sure there aren't any side effects with other DRF things like the wrapped request/response objects.The text was updated successfully, but these errors were encountered: