initial commit

This commit is contained in:
2022-08-28 13:02:29 +08:00
commit 184eb978b7
12 changed files with 84 additions and 0 deletions

3
app/views/__init__.py Normal file
View File

@ -0,0 +1,3 @@
import flask
from . import simple_views

15
app/views/simple_views.py Normal file
View File

@ -0,0 +1,15 @@
from datetime import datetime
import os
from ..app import app
from flask import Blueprint, render_template
simple_views = Blueprint("views", __name__, template_folder=os.path.join(
os.path.dirname(__file__), "templates"))
@simple_views.get("/")
def index_page():
return render_template("index.html", now=datetime.now())
app.register_blueprint(simple_views)