forked from orbit-oss/flask
docs: `<body>, |safe`
This commit is contained in:
parent
17eee81da0
commit
0bb4de1e3b
2 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ Loading jQuery
|
||||||
In order to use jQuery, you have to download it first and place it in the
|
In order to use jQuery, you have to download it first and place it in the
|
||||||
static folder of your application and then ensure it's loaded. Ideally
|
static folder of your application and then ensure it's loaded. Ideally
|
||||||
you have a layout template that is used for all pages where you just have
|
you have a layout template that is used for all pages where you just have
|
||||||
to add a script statement to the bottom of your `<body>` to load jQuery:
|
to add a script statement to the bottom of your ``<body>`` to load jQuery:
|
||||||
|
|
||||||
.. sourcecode:: html
|
.. sourcecode:: html
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ arguments will be inserted as HTML attributes. So for example you can
|
||||||
call ``render_field(form.username, class='username')`` to add a class to
|
call ``render_field(form.username, class='username')`` to add a class to
|
||||||
the input element. Note that WTForms returns standard Python unicode
|
the input element. Note that WTForms returns standard Python unicode
|
||||||
strings, so we have to tell Jinja2 that this data is already HTML escaped
|
strings, so we have to tell Jinja2 that this data is already HTML escaped
|
||||||
with the `|safe` filter.
|
with the ``|safe`` filter.
|
||||||
|
|
||||||
Here the :file:`register.html` template for the function we used above which
|
Here the :file:`register.html` template for the function we used above which
|
||||||
takes advantage of the :file:`_formhelpers.html` template:
|
takes advantage of the :file:`_formhelpers.html` template:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue