|
|
|
@ -7,7 +7,7 @@ from flask import Blueprint, abort, render_template, request, send_from_director
|
|
|
|
from peewee import *
|
|
|
|
from peewee import *
|
|
|
|
|
|
|
|
|
|
|
|
from .app import APPPATH
|
|
|
|
from .app import APPPATH
|
|
|
|
from .modeles import Institution, State, House, Intervention_type, Production_place, Diplo_type, Document, Acte, Individual, Involved_in
|
|
|
|
from .modeles import Institution, State, House, Intervention_type, Production_place, Diplo_type, Document, Agent, Acte, Transcribed_by, Individual, Involved_in
|
|
|
|
|
|
|
|
|
|
|
|
RESULT_PAR_PAGES = 5
|
|
|
|
RESULT_PAR_PAGES = 5
|
|
|
|
|
|
|
|
|
|
|
|
@ -77,13 +77,21 @@ 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(
|
|
|
|
q_acte = Acte.select().where(Acte.filename == acte_id)
|
|
|
|
Acte.filename == acte_id)
|
|
|
|
|
|
|
|
for t in q_acte:
|
|
|
|
for t in q_acte:
|
|
|
|
|
|
|
|
acte_number = t.id_acte
|
|
|
|
acte_place_id = t.prod_place_acte
|
|
|
|
acte_place_id = t.prod_place_acte
|
|
|
|
acte_doc = t.doc_acte
|
|
|
|
acte_doc = t.doc_acte
|
|
|
|
acte_state_id = t.state_doc
|
|
|
|
acte_state_id = t.state_doc
|
|
|
|
acte_diplo_type = t.diplo_type_acte
|
|
|
|
acte_diplo_type = t.diplo_type_acte
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
q_agent = [t.agent_name for t in Agent.select().where(
|
|
|
|
|
|
|
|
Agent.id_agent ==
|
|
|
|
|
|
|
|
[t.transcr_agent for t in Transcribed_by.select().where(
|
|
|
|
|
|
|
|
Transcribed_by.transcr_acte == acte_number)][0])]
|
|
|
|
|
|
|
|
transcriber = q_agent[0]
|
|
|
|
|
|
|
|
|
|
|
|
place = [t.placename for t in Production_place.select().where(
|
|
|
|
place = [t.placename for t in Production_place.select().where(
|
|
|
|
Production_place.id_place == acte_place_id)]
|
|
|
|
Production_place.id_place == acte_place_id)]
|
|
|
|
diplo_t = [t.diplo_label for t in Diplo_type.select().where(
|
|
|
|
diplo_t = [t.diplo_label for t in Diplo_type.select().where(
|
|
|
|
@ -120,7 +128,8 @@ def acte(house=None, prince=None, acte_id=None):
|
|
|
|
return render_template("acte.html", house=house, prince=prince,
|
|
|
|
return render_template("acte.html", house=house, prince=prince,
|
|
|
|
infos=q_acte, place=place[0], doc=doc[0][0], arch=inst[0],
|
|
|
|
infos=q_acte, place=place[0], doc=doc[0][0], arch=inst[0],
|
|
|
|
diplo=diplo_t[0].replace("_", " "), state=state[0],
|
|
|
|
diplo=diplo_t[0].replace("_", " "), state=state[0],
|
|
|
|
output_doc=output_doc, name_prince=prince_name[0])
|
|
|
|
output_doc=output_doc, name_prince=prince_name[0],
|
|
|
|
|
|
|
|
transcriber=transcriber)
|
|
|
|
|
|
|
|
|
|
|
|
@main.route("/contact")
|
|
|
|
@main.route("/contact")
|
|
|
|
def contact() -> t.Text:
|
|
|
|
def contact() -> t.Text:
|
|
|
|
|