Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from flask import Flask, render_template, request
- app = Flask(__name__)
- line = 'default'
- @app.route('/', methods=['GET', 'POST'])
- def index():
- global line
- if request.method == 'POST':
- line = request.form['line']
- return render_template('index.html', line=line)
- @app.route('/get-line')
- def get_line():
- return line
- if __name__ == '__main__':
- app.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement