Skip to content
Myr

Clean up docs and review pull request #384

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

Spelunking through the issues at the PyCon sprints.

authored by Ned Jackson Lovely · committed by Ned Jackson Lovely · parent cb24646 · Browse files · 1 file+9 added−8 removed
This commit

State

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

Diff stats

1 file+9 added−8 removed

  • other:+9 added−8 removed

1 file+9 added−8 removed

modified:flask/helpers.py+9 added-8 removed
117 unmodified lines
118119 .. versionadded:: 0.2120121 .. versionadded:: 0.9122 If the argument ``padded`` true than the json object will pad for123 JSONP calls like from jquery. The response mimetype will also change124 to ``text/javascript``.122 If the ``padded`` argument is true, the JSON object will be padded123 for JSONP calls and the response mimetype will be changed to 124 ``text/javascript``. By default, the request arguments ``callback``125 and ``jsonp`` will be used as the name for the callback function.126 This will work with jQuery and most other JavaScript libraries127 by default.128126 The json object will pad as javascript function with the function name 127 from the request argument ``callback`` or ``jsonp``. If the argument128 ``padded`` a string jsonify will look for the function name in the129 request argument with the name which is equal to ``padded``. Is there130 no function name it will fallback and use ``jsonp`` as function name.129 If the ``padded`` argument is a string, jsonify will look for130 the request argument with the same name and use that value as the131 callback-function name.132 """133 if __debug__:134 _assert_have_json()135 if 'padded' in kwargs:
575 unmodified lines