918bad1a47
Signed-off-by: Robert Nedela <robertnedela15@gmail.com>
25 lines
614 B
Python
25 lines
614 B
Python
from flask import Flask, request, render_template, redirect
|
|
|
|
app = Flask(__name__, static_url_path="/public", static_folder="public")
|
|
|
|
|
|
@app.route("/")
|
|
def index():
|
|
return render_template('initial_design.html')
|
|
|
|
@app.route("/google")
|
|
def redir_to_google():
|
|
return redirect("https://www.google.com", code=302)
|
|
|
|
@app.route("/second")
|
|
def second_page():
|
|
return render_template("second.html", mycontent=request.args.get("mycontent", "<not specified>"))
|
|
|
|
@app.errorhandler(404)
|
|
def error404(code):
|
|
return render_template('404.html')
|
|
|
|
if __name__ == "__main__":
|
|
app.run(debug=True, port=5000)
|
|
|