sort list of acte

main
jgenero 3 years ago
parent 18ed68dac2
commit 7932052f60

@ -99,7 +99,7 @@ def _create_doc(xml_file: str, folder: str)-> None:
def _create_acte(xml_file: str, folder: str)-> None: def _create_acte(xml_file: str, folder: str)-> None:
actes = [] actes = []
for acte in os.listdir(folder): for acte in sorted(os.listdir(folder)):
soup = make_soup(os.path.join(folder, acte)) soup = make_soup(os.path.join(folder, acte))
numb = soup.TEI["xml:id"] numb = soup.TEI["xml:id"]
date_time = soup.msItem.docDate["when"] date_time = soup.msItem.docDate["when"]

@ -52,7 +52,7 @@ def prince_corpus(house=None, prince=None):
info = [(t.numb_acte, t.date) for t in Acte.select().where( info = [(t.numb_acte, t.date) for t in Acte.select().where(
Acte.id_acte == acte)] Acte.id_acte == acte)]
prince_acte.append(info[0]) prince_acte.append(info[0])
prince_acte = prince_acte prince_acte = sorted(prince_acte)
return render_template("prince_corpus.html", houseS=house, duke_name=prince_name, lst_id=prince_acte) return render_template("prince_corpus.html", houseS=house, duke_name=prince_name, lst_id=prince_acte)
@main.route("/actes/<house>/<prince>/<acte_id>") # don't put a slash at the end @main.route("/actes/<house>/<prince>/<acte_id>") # don't put a slash at the end

Loading…
Cancel
Save