Skip to content

Instantly share code, notes, and snippets.

@aprsn
Last active July 30, 2020 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aprsn/10817fd3d6a8178878d7784e303f7f4c to your computer and use it in GitHub Desktop.
Save aprsn/10817fd3d6a8178878d7784e303f7f4c to your computer and use it in GitHub Desktop.
Finage Example Currency Converter Page Steps
from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route('/convert/')
@app.route('/convert/<base>/<to>/<amount>')
def convert(base=None, to=None, amount=None):
return render_template('index.html', base=base, to=to, value = value)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
{{ base + to }}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment