-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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
| def is_cbv_view(func: Callable) -> bool: | |
| """ | |
| Determine if a function is a result of a CBV as_view() call. | |
| """ | |
| return hasattr(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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request