Display a random number
This commit is contained in:
parent
73e9320e99
commit
57bd5d2edb
2 changed files with 3 additions and 2 deletions
|
@ -1,12 +1,13 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
from flask import Flask, render_template
|
from flask import Flask, render_template
|
||||||
|
from random import randint
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def hello():
|
def hello():
|
||||||
return render_template("hello.html")
|
return render_template("hello.html", num = randint(1, 23))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run()
|
app.run()
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Hello Slider!
|
Hello slider number {{ num }}!
|
||||||
|
|
Loading…
Reference in a new issue