Skip to content

initialize_request in view.py converts the request in Request without checking the incoming request type #2771

@a6kme

Description

@a6kme

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy