mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
[3.2.x] Clarified URL patterns in tutorial 3.
Co-authored-by: Nick Pope <nick@nickpope.me.uk> Backport of 4114531cb763f7cf226d3904d3693af4dc634947 from main
This commit is contained in:
parent
87e7399760
commit
2c46e55314
@ -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
|
||||
======================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user