commit
55f0d60e04
|
@ -1,12 +1,15 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from flask import Flask, render_template
|
||||
from random import randint
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def hello():
|
||||
return render_template("hello.html")
|
||||
return render_template("hello.html", num=randint(1, 23))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
Hello Slider!
|
||||
<html>
|
||||
<body>
|
||||
<p>Hello slider number {{ num }}!</p>
|
||||
<p><img src="{{ url_for("static", filename="cat.jpg") }}"></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue