Skip to content
Myr

README.rst

This file

Path

examples/javascript/README.rst

48 lines · 1.1 KiB

Last changed by

examples/javascript: replace obsolete link (#5287)Iztok Fister Jrbefore adoption541bc8d

History of this file

Take it

The walk stopped after 200 commits: lines older than 1888df3 point at it.

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption1888df3

lines 1–5why, one step back
1JavaScript Ajax Example
2=======================34Demonstrates how to post form data and process a JSON response using5JavaScript. This allows making requests without navigating away from the

Merge branch '2.1.x'David Lordbefore adoptiondcd1a1e

lines 6–7why, one step back
6page. Demonstrates using |fetch|_, |XMLHttpRequest|_, and
7|jQuery.ajax|_. See the `Flask docs`_ about JavaScript and Ajax.

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption1888df3

lines 8–11why, one step back
8
9.. |fetch| replace:: ``fetch``10.. _fetch: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch11

Merge branch '2.1.x'David Lordbefore adoptiondcd1a1e

lines 12–14why, one step back
12.. |XMLHttpRequest| replace:: ``XMLHttpRequest``
13.. _XMLHttpRequest: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest14

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption1888df3

lines 15–17why, one step back
15.. |jQuery.ajax| replace:: ``jQuery.ajax``
16.. _jQuery.ajax: https://api.jquery.com/jQuery.ajax/17

examples/javascript: replace obsolete link (#5287)Iztok Fister Jrbefore adoption541bc8d

line 18why, one step back
18.. _Flask docs: https://flask.palletsprojects.com/patterns/javascript/

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption1888df3

lines 19–23why, one step back
19
2021Install22-------23

Merge branch '2.1.x'David Lordbefore adoptiondcd1a1e

line 24why, one step back
24.. code-block:: text

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption1888df3

line 25why, one step back
25

Merge pull request #4947 from pallets/pyprojectDavid Lordbefore adoption78b42b9

lines 26–27why, one step back
26 $ python3 -m venv .venv
27 $ . .venv/bin/activate

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption1888df3

lines 28–33why, one step back
28 $ pip install -e .
293031Run32---33

Merge branch '2.1.x'David Lordbefore adoptiondcd1a1e

line 34why, one step back
34.. code-block:: text

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption1888df3

line 35why, one step back
35

Merge pull request #4646 from pallets/cli-app-envDavid Lordbefore adoptionae54727

line 36why, one step back
36 $ flask --app js_example run

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption1888df3

lines 37–43why, one step back
37
38Open http://127.0.0.1:5000 in a browser.394041Test42----43

Merge branch '2.1.x'David Lordbefore adoptiondcd1a1e

line 44why, one step back
44.. code-block:: text

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption1888df3

lines 45–48why, one step back
45
46 $ pip install -e '.[test]'47 $ coverage run -m pytest48 $ coverage report