Skip to content

Add DRF Support #6

@sjbitcode

Description

@sjbitcode

Currently the cbv check consists of an attribute check on the view function:

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions