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
I am trying to call a class baed view from another class based view using This SO post. I called a class baed view by passing in the request like MyClassBasedView.as_view()(request). When I tried to access the HTTPRequest from request, I had to access it like request._request._request, instead of request._request. I checked the code in views.py and it is converting the incoming request to Request without checking the instance of request. I managed it by using MyClassBasedView.as_view()(request._request)
This is my first reporting of an issue. Please be gentle if I violated any guideline.
The text was updated successfully, but these errors were encountered:
There might also be some cases where that'd be helpful if folks are manually constructing Request instances in test cases and passing them to the view.
I'm slightly unclear why you'd need to access the underlying HTTPRequest instance tho, as the proxying behavior we provide should generally ensure that it's not needed.
I am trying to call a class baed view from another class based view using This SO post. I called a class baed view by passing in the request like
MyClassBasedView.as_view()(request)
. When I tried to access the HTTPRequest from request, I had to access it like request._request._request, instead of request._request. I checked the code in views.py and it is converting the incoming request to Request without checking the instance of request. I managed it by usingMyClassBasedView.as_view()(request._request)
This is my first reporting of an issue. Please be gentle if I violated any guideline.
The text was updated successfully, but these errors were encountered: