Modify comment syntax error
This commit is contained in:
parent
cc66213e57
commit
08cd375108
14 changed files with 24 additions and 24 deletions
|
|
@ -260,7 +260,7 @@ an argument, ``id``. That corresponds to the ``<int:id>`` in the route.
|
|||
A real URL will look like ``/1/update``. Flask will capture the ``1``,
|
||||
ensure it's an :class:`int`, and pass it as the ``id`` argument. If you
|
||||
don't specify ``int:`` and instead do ``<id>``, it will be a string.
|
||||
To generate a URL to the update page, :func:`url_for` needs to be passed
|
||||
To generate an URL to the update page, :func:`url_for` needs to be passed
|
||||
the ``id`` so it knows what to fill in:
|
||||
``url_for('blog.update', id=post['id'])``. This is also in the
|
||||
``index.html`` file above.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ A view function is the code you write to respond to requests to your
|
|||
application. Flask uses patterns to match the incoming request URL to
|
||||
the view that should handle it. The view returns data that Flask turns
|
||||
into an outgoing response. Flask can also go the other direction and
|
||||
generate a URL to a view based on its name and arguments.
|
||||
generate an URL to a view based on its name and arguments.
|
||||
|
||||
|
||||
Create a Blueprint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue