Skip to content

Instantly share code, notes, and snippets.

@AyaanZaveri
Last active October 13, 2021 14:14
Show Gist options
  • Save AyaanZaveri/471353970d0f6ec4f8b9a8bb4710903a to your computer and use it in GitHub Desktop.
Save AyaanZaveri/471353970d0f6ec4f8b9a8bb4710903a to your computer and use it in GitHub Desktop.
Flask Boilerplate
from flask import Flask, render_template, session
from flask import request
app = Flask(__name__)
app.secret_key = "abc"
@app.route('/', methods=['GET','POST'])
def process():
name = request.form.get('name','')
session['name'] = name.title()
print(name)
# Code
return render_template('index.html', answer=answer)
if __name__ == '__main__':
app.run(host="0.0.0.0", debug=True, threaded=True, port=3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment