initial: blog-app snapshot
This commit is contained in:
36
routes/pages.py
Normal file
36
routes/pages.py
Normal file
@@ -0,0 +1,36 @@
|
||||
"""Page blueprint: HTML routes rendering Jinja2 templates."""
|
||||
|
||||
from flask import Blueprint, jsonify, render_template
|
||||
|
||||
bp = Blueprint("pages", __name__)
|
||||
|
||||
|
||||
@bp.route("/healthz")
|
||||
def page_healthz():
|
||||
"""Liveness probe. 不查 DB — deploy.sh 用它判断进程是否活着."""
|
||||
return jsonify({"status": "ok"})
|
||||
|
||||
|
||||
@bp.route("/")
|
||||
def page_index():
|
||||
return render_template("index.html")
|
||||
|
||||
|
||||
@bp.route("/projects")
|
||||
def page_projects():
|
||||
return render_template("projects.html")
|
||||
|
||||
|
||||
@bp.route("/projects/<int:project_id>")
|
||||
def page_project_detail(project_id):
|
||||
return render_template("project_detail.html", project_id=project_id)
|
||||
|
||||
|
||||
@bp.route("/search")
|
||||
def page_search():
|
||||
return render_template("search.html")
|
||||
|
||||
|
||||
@bp.route("/analyze")
|
||||
def page_analyze():
|
||||
return render_template("analyze.html")
|
||||
Reference in New Issue
Block a user