flask/docs/tutorial
zach wick e08f365543
Fixes a comparison within one of the tutorial's Jinja2 templates.
The Jinja2 template previously compared the user id of the currently logged in user
with the `author_id` of each blog post in order to determine if the logged in user
had edit permissions on that blog post. However, one of `g.user['id']` and
`post['author_id']` was a string and the other was an integer. This caused the
equality comparison to fail in every case.

Now, a Jinja filter is used to cast each of the operands to the same type prior to
the equality comparison being evaluated. This ensures that the "Edit" link/button
now shows up when appropriate.

Signed-off-by: zach wick <zach@zachwick.com>
2022-05-04 19:26:30 -04:00
..
blog.rst Fixes a comparison within one of the tutorial's Jinja2 templates. 2022-05-04 19:26:30 -04:00
database.rst remove unused ref directives 2020-04-04 12:57:14 -07:00
deploy.rst Adding Fish commands to docs 2022-01-14 08:26:50 -08:00
factory.rst Adding Fish commands to docs 2022-01-14 08:26:50 -08:00
flaskr_edit.png rewrite tutorial docs and example 2018-04-09 00:53:25 -07:00
flaskr_index.png rewrite tutorial docs and example 2018-04-09 00:53:25 -07:00
flaskr_login.png rewrite tutorial docs and example 2018-04-09 00:53:25 -07:00
index.rst Fix typo in docs/tutorial/index.rst 2021-05-24 16:33:02 +08:00
install.rst Merge branch '1.0.x' 2019-06-23 16:57:52 -07:00
layout.rst replace nbsp characters 2021-11-16 08:34:55 -08:00
next.rst remove unused ref directives 2020-04-04 12:57:14 -07:00
static.rst add missing port to localhost URL 2018-04-30 19:03:05 -07:00
templates.rst Replace old pocoo links everywhere 2019-11-19 09:32:35 -08:00
tests.rst update tests for relative redirects 2022-03-25 11:48:26 -07:00
views.rst safer check for existing user in tutorial 2021-08-05 18:01:55 -07:00