Skip to content
New issue

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

Add DRF Support #6

Open
sjbitcode opened this issue Jan 13, 2023 · 0 comments
Open

Add DRF Support #6

sjbitcode opened this issue Jan 13, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sjbitcode
Copy link
Owner

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.

@sjbitcode sjbitcode added the enhancement New feature or request label Jan 13, 2023
@sjbitcode sjbitcode self-assigned this Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant