0
SUBTOTAL :

Read more

from flask import Flask, render_template_string app = Flask(__name__) product_data = { "name": "boAt Bassheads 100", "price": 299.00, "description": "Awesome earphones", "image": "static/product.jpg" # Assuming you have a product.jpg in static folder } HTML_TEMPLATE = """ Product Page
Product Image

{{ product.name }}

${{ product.price }}

{{ product.description }}

""" @app.route("/") def product_page(): return render_template_string(HTML_TEMPLATE, product=product_data) if __name__ == "__main__": app.run(debug=True)

0 Reviews