index page
parent
1233ba1108
commit
cf5cf93763
@ -0,0 +1,56 @@
|
|||||||
|
import typing as t
|
||||||
|
|
||||||
|
from flask import Blueprint, abort, render_template, request, send_from_directory
|
||||||
|
|
||||||
|
main = Blueprint("main", __name__, url_prefix="/")
|
||||||
|
|
||||||
|
@main.route("/")
|
||||||
|
def home():
|
||||||
|
"""home route"""
|
||||||
|
return render_template("home.html")
|
||||||
|
|
||||||
|
|
||||||
|
@main.route("/about/")
|
||||||
|
def about():
|
||||||
|
"""home route"""
|
||||||
|
return render_template("about.html")
|
||||||
|
|
||||||
|
|
||||||
|
@main.route("/actes/")
|
||||||
|
def corpora_all():
|
||||||
|
"""copora all route"""
|
||||||
|
return "hello"
|
||||||
|
# info = [(t.date, t.filename, t.analysis, t.prod_place_acte,
|
||||||
|
# t.diplo_type_acte, t.state_doc) for t in Acte.select()]
|
||||||
|
# prince_acte = []
|
||||||
|
# return render_template("corpora_all.html")
|
||||||
|
|
||||||
|
|
||||||
|
@main.route("/actes/<house>") # dont put a slash at the end
|
||||||
|
def actes(house):
|
||||||
|
"""actes route"""
|
||||||
|
return "hello"
|
||||||
|
# house_q = [t.id_house for t in House.select().where(
|
||||||
|
# House.house_label == house)]
|
||||||
|
# prince_q = [(t.name_indiv, t.id_indiv) for t in Individual.select().where(
|
||||||
|
# (Individual.role_indiv == "prince")
|
||||||
|
# &(Individual.house_indiv == house_q[0]))]
|
||||||
|
# return render_template("corpus.html", house=house, princes=prince_q)
|
||||||
|
|
||||||
|
|
||||||
|
@main.route("/contact")
|
||||||
|
def contact() -> t.Text:
|
||||||
|
"""Displays the Contact page"""
|
||||||
|
return render_template("contact.html", title="Contact")
|
||||||
|
|
||||||
|
|
||||||
|
@main.route("/termsofservice")
|
||||||
|
def terms() -> t.Text:
|
||||||
|
"""Displaysthe T&C page."""
|
||||||
|
return render_template("terms.html", title="Mentions légales")
|
||||||
|
|
||||||
|
|
||||||
|
@main.route("/privacy")
|
||||||
|
def privacy() -> t.Text:
|
||||||
|
"""Displays the privacy policy page."""
|
||||||
|
return render_template("privacy.html", title="Politique de confidentialité")
|
||||||
Loading…
Reference in New Issue