Print POST Data In any web app, you’ll have to process incoming request data from users. Flask, like any other web framework, allows you to access the request data easily. Next step is going to be to make use of the value: from flask import Flask from flask import render_template app = Flask(__name__) @app.route(“/”), methods=[‘GET’, […]
Bootstrap
Data POST and adding Logic
Adding custom data calculation Now let’s do more data calculation. We open “process_data.py” and edit the file with this script: def calculate_coin(price_usd): return (float(price_usd) > 40 def process(): data = get_data(“/v1/ticker/?limit=10”) all_coins = [] for coin in data: coin [“isover40”] = calculate_coin(coin[“price_usd”]) all_coins.append(coin) return all_coins Creating Bootstrap form and submit button In this part we […]
Use of Bootstrap and styling
Starting with Bootstrap Bootstrap is a framework to help you design websites faster and easier. It includes HTML and CSS based design templates for typography, forms, buttons, tables, navigation, modals, etc. In the HTML Code from the last exercises named “index.html” create a new header section and we are going to input the bootstrap CSS <html> […]