https://github.com/pierre-loic/flask_ajax
A basic example of a Flask application with AJAX
https://github.com/pierre-loic/flask_ajax
ajax flask html5 jinja2 jquery python
Last synced: about 2 months ago
JSON representation
A basic example of a Flask application with AJAX
- Host: GitHub
- URL: https://github.com/pierre-loic/flask_ajax
- Owner: Pierre-Loic
- Created: 2019-02-05T10:08:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-19T07:06:10.000Z (almost 7 years ago)
- Last Synced: 2025-01-21T08:08:48.152Z (over 1 year ago)
- Topics: ajax, flask, html5, jinja2, jquery, python
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flask_AJAX
## Basic example of a Flask application with AJAX
This is a basic example to understand how you can use Flask with AJAX with the framework Jquery. The example is divided in 6 small steps in order to understand how data are sent from the front-end to the back-end and from the back-end to the front-end.
## Technologies used :
* Python with Flask
* HTML with Jinja2
* Javascript with Jquery
* Wikipedia API
## Steps of the example :
* STEP 1 (run.py)
The user opens the home page
* STEP 2 (main.html)
The user fills the input box with a word
* STEP 3 (main.html)
An AJAX request is sent to the url /test_ajax/
* STEP 4 (run.py)
Data are collected from the request and sent to an API
* STEP 5 (run.py)
API Data are sent back to the template
* STEP 6 (main.html)
div#reponse is updated with API data