Skip to content

Instantly share code, notes, and snippets.

@bcarpio
Created October 20, 2013 02:37
Show Gist options
  • Save bcarpio/7064239 to your computer and use it in GitHub Desktop.
Save bcarpio/7064239 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# vim: set expandtab:
from flask import Flask, flash, abort, redirect, url_for, request, render_template, make_response, json, Response
import os, sys
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def index():
if request.method == 'POST':
print request.form['twenty']
twentys = request.form['twenty']
tens = request.form['ten']
return render_template('result.html', twentys = twentys,tens=tens)
return render_template('form.html')
if __name__ == "__main__":
app.debug = True
app.run(host='0.0.0.0')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment