|
|
|
@ -49,9 +49,22 @@ def prince_corpus(house=None, prince=None):
|
|
|
|
&(Involved_in.invol_in_interv == 1))]
|
|
|
|
&(Involved_in.invol_in_interv == 1))]
|
|
|
|
prince_acte = []
|
|
|
|
prince_acte = []
|
|
|
|
for acte in actes:
|
|
|
|
for acte in actes:
|
|
|
|
info = [(t.filename, t.date, t.analysis) for t in Acte.select().where(
|
|
|
|
info = [(t.filename, t.date, t.analysis, t.prod_place_acte,
|
|
|
|
Acte.id_acte == acte)]
|
|
|
|
t.diplo_type_acte, t.state_doc) for t in Acte.select(
|
|
|
|
prince_acte.append(info[0])
|
|
|
|
).where(Acte.id_acte == acte)]
|
|
|
|
|
|
|
|
place = [t.placename for t in Production_place.select().where(
|
|
|
|
|
|
|
|
Production_place.id_place == info[0][3])]
|
|
|
|
|
|
|
|
diplo_t = [t.diplo_label for t in Diplo_type.select().where(
|
|
|
|
|
|
|
|
Diplo_type.id_diplo_type == info[0][4])]
|
|
|
|
|
|
|
|
state = [t.state_label for t in State.select().where(
|
|
|
|
|
|
|
|
State.id_state == info[0][5])]
|
|
|
|
|
|
|
|
# avoid TypeError: 'tuple' object does not support item assignment :
|
|
|
|
|
|
|
|
infos_lst = list(info[0])
|
|
|
|
|
|
|
|
infos_lst[3] = place[0]
|
|
|
|
|
|
|
|
infos_lst[4] = diplo_t[0].replace("_", " ")
|
|
|
|
|
|
|
|
infos_lst[5] = state[0]
|
|
|
|
|
|
|
|
prince_acte.append(infos_lst)
|
|
|
|
|
|
|
|
|
|
|
|
prince_acte = sorted(prince_acte)
|
|
|
|
prince_acte = sorted(prince_acte)
|
|
|
|
# print(prince_acte)
|
|
|
|
# print(prince_acte)
|
|
|
|
|
|
|
|
|
|
|
|
@ -73,14 +86,14 @@ def acte(house=None, prince=None, acte_id=None):
|
|
|
|
acte_diplo_type = t.diplo_type_acte
|
|
|
|
acte_diplo_type = t.diplo_type_acte
|
|
|
|
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)]
|
|
|
|
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_t = [t.diplo_label for t in Diplo_type.select().where(
|
|
|
|
Diplo_type.id_diplo_type == acte_diplo_type)]
|
|
|
|
Diplo_type.id_diplo_type == acte_diplo_type)]
|
|
|
|
state = [t.state_label for t in State.select().where(
|
|
|
|
state = [t.state_label for t in State.select().where(
|
|
|
|
State.id_state == acte_state_id)]
|
|
|
|
State.id_state == acte_state_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])]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if the acte if in another house's folder,
|
|
|
|
# if the acte if in another house's folder,
|
|
|
|
|