Which function in django creates a HttpRequest instance and hands to a view?

后端 未结 2 1485
清酒与你
清酒与你 2021-02-14 01:57

Am try to understand the guts of django, and i cant get any good tutorial on this.

I know django views receive a HttpRequest instance as one of the arguments when they

2条回答
  •  失恋的感觉
    2021-02-14 02:51

    >>> from django.http import HttpRequest
    >>> HttpRequest()
    
    

    If you need this for testing and emulating requests, that's fine, but if you try to use this to call views from one another, it's inefficient.

提交回复
热议问题