Skip to content
Myr

docs: ``<body>``, ``|safe``

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by defuz · committed by defuz · parent 17eee81 · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:docs/patterns/jquery.rst+1 added-1 removed
17 unmodified lines
1819In order to use jQuery, you have to download it first and place it in the20static folder of your application and then ensure it's loaded. Ideally21you have a layout template that is used for all pages where you just have22to add a script statement to the bottom of your `<body>` to load jQuery:22to add a script statement to the bottom of your ``<body>`` to load jQuery:2324.. sourcecode:: html2526 <script type=text/javascript src="{{
142 unmodified lines
modified:docs/patterns/wtforms.rst+1 added-1 removed
98 unmodified lines
99arguments will be inserted as HTML attributes. So for example you can100call ``render_field(form.username, class='username')`` to add a class to101the input element. Note that WTForms returns standard Python unicode102strings, so we have to tell Jinja2 that this data is already HTML escaped103with the `|safe` filter.103with the ``|safe`` filter.104105Here the :file:`register.html` template for the function we used above which106takes advantage of the :file:`_formhelpers.html` template:107
19 unmodified lines