Bishwas-py / djapy

No bullshit, Django Rest API Framework
https://djapy.io
59 stars 3 forks source link

Allow receiving HTTPResponse in view function #12

Closed Bishwas-py closed 4 months ago

Bishwas-py commented 4 months ago

Allow receiving HTTPResponse: AttributeError: type object 'HttpResponse' has no attribute 'schema'

@djapify
@ensure_csrf_cookie
@csrf_exempt
def assign_csrf_token(request, response: HttpResponse) -> Any:
     #                         ^ should be allowed
    return response
Bishwas-py commented 4 months ago

It is now possible after the following commits: