Refs #23276 -- Fixed explanation of how calling views works.
"Importing the view" is no longer applicable after
a9fd740d22
.
This commit is contained in:
parent
84b7cb7df0
commit
9075805570
|
@ -209,9 +209,9 @@ matches the requested URL. (If none of them matches, Django calls a
|
||||||
special-case 404 view.) This is blazingly fast, because the regular expressions
|
special-case 404 view.) This is blazingly fast, because the regular expressions
|
||||||
are compiled at load time.
|
are compiled at load time.
|
||||||
|
|
||||||
Once one of the regexes matches, Django imports and calls the given view, which
|
Once one of the regexes matches, Django calls the given view, which is a Python
|
||||||
is a simple Python function. Each view gets passed a request object --
|
function. Each view gets passed a request object -- which contains request
|
||||||
which contains request metadata -- and the values captured in the regex.
|
metadata -- and the values captured in the regex.
|
||||||
|
|
||||||
For example, if a user requested the URL "/articles/2005/05/39323/", Django
|
For example, if a user requested the URL "/articles/2005/05/39323/", Django
|
||||||
would call the function ``news.views.article_detail(request,
|
would call the function ``news.views.article_detail(request,
|
||||||
|
|
Loading…
Reference in New Issue