...

/

Solution: Separate HTML Templates

Solution: Separate HTML Templates

In this lesson, we will look into the solution of the challenge given in the previous lesson.

We'll cover the following...

The complete implementation of the problem is provided below. Let’s take a look at it!

Solution #

"""Flask Application for Paws Rescue Center."""
from flask import Flask, render_template
app = Flask(__name__)


@app.route("/")
def homepage():
    """View function for Home Page."""
    return render_template("home.html")


@app.route("/about")
def about():
    """View function for About Page."""
    return render_template("about.html")


if __name__ == "__main__":
    app.run(debug=True, host="0.0.0.0", port=3000)
...