Skip to content

Commit

Permalink
Initial commit of working code for Weeks 6 and 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Maureen Slavin committed Jul 21, 2018
0 parents commit 631a236
Show file tree
Hide file tree
Showing 7 changed files with 8,515 additions and 0 deletions.
21 changes: 21 additions & 0 deletions flask_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from flask import Flask, request, render_template
app = Flask(__name__)
app.config["DEBUG"] = True

@app.route('/', methods=['GET'])
def main():
# found in ../templates/
return render_template("main_page.html")

@app.route('/process_inputs', methods=['POST'])
def process_inputs():
name = request.form.get('input_name', '')
dropdown = request.form.get('input_dropdown', '')
select = request.form.get('input_select', '')
freeform = request.form.get('input_freeform', '')
return render_template("main_page.html", input_data=dropdown,
output="You're a wizard %s." % name)


if __name__ == '__main__':
app.run()
Loading

0 comments on commit 631a236

Please sign in to comment.