from flask import Flask, redirect, url_for, render_template, request app=Flask(__name__) @app.route("/") def home(): app.route('/') return render_template("index.html") def home2(name): # app.route('/home2/') # return redirect(url_for('home')) return render_template("home.html") def success(name): return "welcome %s" % name # this is a weird way to do this # right? def widg_fun(widg): if(widg.w_type == "input"): return "input id=id_%s name=%s type=text>', 'home2', home2) app.add_url_rule('/success/', 'success', success) app.add_url_rule('/login', 'login', login, methods = ['POST', 'GET']) app.add_url_rule('/req', 'req', req, methods = ['POST', 'GET']) app.run(host="192.168.1.228",debug=True)