script flask project.py - from flask import Flask render_template request [email protected]\/greet methods='POST def greet inputName =

script flask project.py - from flask import Flask...

This preview shows page 1 out of 1 page.

from flask import Flask, render_template, request app=Flask(__name__) @app.route('/greet', methods=['POST']) def greet(): inputName = request.form['myName'] ip = request.remote_addr #write data to file or to DB inputName = inputName.upper()+" hi! Visiting from " + str(ip) return render_template("home.html",myName=inputName)
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '08
  • STAFF
  • American record labels, Bruno, flask import Flask, #Write, @app

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture