jweinst1
9/20/2015 - 4:26 AM

Basic Flask App that allows the functional processing of an html form text input

Basic Flask App that allows the functional processing of an html form text input

@app.route('/', methods=['GET', 'POST'])
def index(result=None):
    if request.args.get('mail', None):
        retrieved_text = request.args['mail']
        result = process_text(retrieved_text)
    return render_template('index.html', result=result)


def process_text(text):
    return "FOO" + text