Skip to content
Myr

Merge remote-tracking branch 'origin/1.1.x'

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

authored by David Lord · committed by David Lord · parents b074a2e, c12d9f8 · Browse files · 2 files+6 added−3 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+6 added−3 removed

  • other:+6 added−3 removed

2 files+6 added−3 removed

modified:docs/quickstart.rst+3 added-1 removed
203 unmodified lines
204``<variable_name>``. Your function then receives the ``<variable_name>``205as a keyword argument. Optionally, you can use a converter to specify the type206of the argument like ``<converter:variable_name>``. ::207208 from markupsafe import escape209210 @app.route('/user/<username>')211 def show_user_profile(username):212 # show the user profile for that user213 return f'User {username}'
209 unmodified lines
423markup to HTML) you can mark it as safe by using the424:class:`~markupsafe.Markup` class or by using the ``|safe`` filter in the425template. Head over to the Jinja 2 documentation for more examples.426425Here is a basic introduction to how the :class:`~jinja2.Markup` class works::427Here is a basic introduction to how the :class:`~markupsafe.Markup` class works::428429 >>> from markupsafe import Markup430 >>> Markup('<strong>Hello %s!</strong>') % '<blink>hacker</blink>'431 Markup(u'<strong>Hello &lt;blink&gt;hacker&lt;/blink&gt;!</strong>')
471 unmodified lines
modified:docs/reqcontext.rst+3 added-2 removed
254 unmodified lines
255256- The proxy objects cannot fake their type as the actual object types.257 If you want to perform instance checks, you have to do that on the258 object being proxied.259- If the specific object reference is important, for example for260 sending :ref:`signals` or passing data to a background thread.259- The reference to the proxied object is needed in some situations,260 such as sending :ref:`signals` or passing data to a background261 thread.262263If you need to access the underlying object that is proxied, use the264:meth:`~werkzeug.local.LocalProxy._get_current_object` method::265
2 unmodified lines