what is "request" in Django view
django, python
Solution
The request parameter is a `HttpRequest` object, which contains data about the request (see the docs for django 3.2).
In your urls file, you are not calling the `view.index` function, just listing a reference to it. Django then calls the function when a matching request comes in and passes the `HttpRequest` object as a parameter.
Problem
In the Django tutorial for the first app in Django we have ``` from django.http import HttpResponse def index(request): return HttpResponse("Hello, world. You're at the polls index.") ``` And then the urls.py has ``` from django.conf.urls import url from polls import views urlpatterns = [ url(r'^$', views.index, name='index'), ] ``` Now my question is what is the "request" parameter passed to the index function, also when the function index is called in urls.py it is not passed and variables it is just called as views.index in the line `url(r'^$', views.index, name='index'),`