zhdo.space/app.py

24 lines
444 B
Python
Raw Normal View History

2022-05-13 17:55:48 +08:00
from flask import Flask
from flask.templating import render_template
2022-05-13 22:11:11 +08:00
from helper import *
2022-05-13 17:55:48 +08:00
app = Flask(__name__)
2022-05-13 22:11:11 +08:00
2022-05-13 17:55:48 +08:00
@app.route("/")
def index():
2022-05-13 22:11:11 +08:00
return render_template(
"index.html",
recentArticle=getRecentArticle(),
recentDiscussion=getRecentDiscussion(),
)
2022-05-13 17:55:48 +08:00
@app.route("/privacy")
def privacypolicy():
return render_template("privacypolicy.html")
2022-05-13 22:11:11 +08:00
2022-05-13 17:55:48 +08:00
if __name__ == "__main__":
2022-05-14 11:33:20 +08:00
app.run(host="127.0.0.1")