Clarified URL patterns in tutorial 3.

Co-authored-by: Nick Pope <nick@nickpope.me.uk>
This commit is contained in:
ilu_vatar_ 2021-08-02 08:00:43 +02:00 committed by GitHub
parent f9b7704ab3
commit 4114531cb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -121,9 +121,10 @@ like so::
The ``question_id=34`` part comes from ``<int:question_id>``. Using angle
brackets "captures" part of the URL and sends it as a keyword argument to the
view function. The ``:question_id>`` part of the string defines the name that
will be used to identify the matched pattern, and the ``<int:`` part is a
view function. The ``question_id`` part of the string defines the name that
will be used to identify the matched pattern, and the ``int`` part is a
converter that determines what patterns should match this part of the URL path.
The colon (``:``) separates the converter and pattern name.
Write views that actually do something
======================================