|
|
|
@ -2,7 +2,7 @@ import os
|
|
|
|
import re
|
|
|
|
import re
|
|
|
|
import typing as t
|
|
|
|
import typing as t
|
|
|
|
|
|
|
|
|
|
|
|
import peewee
|
|
|
|
from peewee import *
|
|
|
|
from flask import Blueprint, abort, render_template, request, send_from_directory
|
|
|
|
from flask import Blueprint, abort, render_template, request, send_from_directory
|
|
|
|
from playhouse.flask_utils import PaginatedQuery
|
|
|
|
from playhouse.flask_utils import PaginatedQuery
|
|
|
|
|
|
|
|
|
|
|
|
@ -61,9 +61,26 @@ def acte(house=None, prince=None, acte_id=None):
|
|
|
|
q_prod = Involved_in.select().where(
|
|
|
|
q_prod = Involved_in.select().where(
|
|
|
|
(Involved_in.involved_in_prince == prince)
|
|
|
|
(Involved_in.involved_in_prince == prince)
|
|
|
|
&(Involved_in.invol_in_interv == 1))
|
|
|
|
&(Involved_in.invol_in_interv == 1))
|
|
|
|
q_acte = Acte.select().where(Acte.filename == acte_id)
|
|
|
|
q_acte = Acte.select().where(
|
|
|
|
|
|
|
|
Acte.filename == acte_id)
|
|
|
|
return render_template("acte.html", house=house, prince=prince, infos=q_acte)
|
|
|
|
for t in q_acte:
|
|
|
|
|
|
|
|
acte_place_id = t.prod_place_acte
|
|
|
|
|
|
|
|
acte_doc = t.doc_acte
|
|
|
|
|
|
|
|
acte_state_id = t.state_doc
|
|
|
|
|
|
|
|
acte_diplo_type = t.diplo_type_acte
|
|
|
|
|
|
|
|
place = [t.placename for t in Production_place.select().where(
|
|
|
|
|
|
|
|
Production_place.id_place == acte_place_id)]
|
|
|
|
|
|
|
|
doc = [[t.collection_doc, t.inst_doc] for t in Document.select().where(
|
|
|
|
|
|
|
|
Document.id_document == acte_doc)]
|
|
|
|
|
|
|
|
inst = [t.full_label for t in Institution.select().where(
|
|
|
|
|
|
|
|
Institution.id_institution == doc[0][1])]
|
|
|
|
|
|
|
|
diplo_t = [t.diplo_label for t in Diplo_type.select().where(
|
|
|
|
|
|
|
|
Diplo_type.id_diplo_type == acte_diplo_type)]
|
|
|
|
|
|
|
|
state = [t.state_label for t in State.select().where(
|
|
|
|
|
|
|
|
State.id_state == acte_state_id)]
|
|
|
|
|
|
|
|
return render_template("acte.html", house=house, prince=prince,
|
|
|
|
|
|
|
|
infos=q_acte, place=place[0], doc=doc[0][0], arch=inst[0],
|
|
|
|
|
|
|
|
diplo=diplo_t[0].replace("_", " "), state=state[0])
|
|
|
|
|
|
|
|
|
|
|
|
@main.route("/contact")
|
|
|
|
@main.route("/contact")
|
|
|
|
def contact() -> t.Text:
|
|
|
|
def contact() -> t.Text:
|
|
|
|
|