Serve a static image (not included)
This commit is contained in:
parent
0409e4806d
commit
d45d1347bd
@ -5,9 +5,11 @@ from random import randint
|
|||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def hello():
|
def hello():
|
||||||
return render_template("hello.html", num = randint(1, 23))
|
return render_template("hello.html", num=randint(1, 23))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run()
|
app.run()
|
||||||
|
@ -1 +1,6 @@
|
|||||||
Hello slider number {{ num }}!
|
<html>
|
||||||
|
<body>
|
||||||
|
<p>Hello slider number {{ num }}!</p>
|
||||||
|
<p><img src="{{ url_for("static", filename="cat.jpg") }}"></p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
Reference in New Issue
Block a user