Date dernière màj

This commit is contained in:
Colin Maudry
2025-06-16 19:22:00 +02:00
parent 89f95904b8
commit 9f74aaea69
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -3,7 +3,7 @@ from dash import dcc, html, register_page
title = "À propos" title = "À propos"
register_page( register_page(
__name__, path="/a-propos", title=f"decp.info - {title}", name=title, order=3 __name__, path="/a-propos", title=f"decp.info - {title}", name=title, order=5
) )
layout = [ layout = [
@@ -22,6 +22,7 @@ Contact :
- [colin+decp@maudry.com](mailto:colin+decp@maudry.com) - [colin+decp@maudry.com](mailto:colin+decp@maudry.com)
- BlueSky : [@col1m.bsky.social](https://bsky.app/profile/col1m.bsky.social) - BlueSky : [@col1m.bsky.social](https://bsky.app/profile/col1m.bsky.social)
- Mastodon : [col1m@mamot.fr](https://mamot.fr/@col1m) - Mastodon : [col1m@mamot.fr](https://mamot.fr/@col1m)
- LinkedIn : [colinmaudry](https://www.linkedin.com/in/colinmaudry/)
""" """
), ),
], ],
+5 -1
View File
@@ -1,3 +1,4 @@
import os
from datetime import datetime from datetime import datetime
import polars as pl import polars as pl
@@ -17,6 +18,8 @@ from src.utils import (
load_dotenv() load_dotenv()
schema = df.schema schema = df.schema
update_date = os.path.getmtime(os.getenv("DATA_FILE_PARQUET_PATH"))
update_date = datetime.fromtimestamp(update_date).strftime("%d/%m/%Y")
df_filtered = pl.DataFrame() df_filtered = pl.DataFrame()
lf: pl.LazyFrame = df.lazy() lf: pl.LazyFrame = df.lazy()
@@ -122,6 +125,7 @@ layout = [
html.P("lignes", id="nb_rows"), html.P("lignes", id="nb_rows"),
html.Button("Télécharger au format Excel", id="btn-download-data"), html.Button("Télécharger au format Excel", id="btn-download-data"),
dcc.Download(id="download-data"), dcc.Download(id="download-data"),
html.P("Données mises à jour le " + str(update_date)),
], ],
className="table-menu", className="table-menu",
), ),
@@ -183,7 +187,7 @@ def update_table(page_current, page_size, filter_query, data_timestamp):
lff = numbers_to_strings(lff) lff = numbers_to_strings(lff)
# Tri des marchés par date de notification # Tri des marchés par date de notification
lff = lff.sort(by=["datePublicationDonnees"], descending=True) lff = lff.sort(by=["datePublicationDonnees"], descending=True, nulls_last=True)
dff: pl.DataFrame = lff.collect() dff: pl.DataFrame = lff.collect()