This commit is contained in:
Colin Maudry
2025-09-19 08:20:15 +02:00
parent 636e0b059d
commit 41d3ca7539
+35
View File
@@ -0,0 +1,35 @@
import dash
from dash import Input, Output, callback, dcc, html, register_page
register_page(
__name__,
path_template="/acheteur/<acheteur_id>",
title="decp.info - acheteur",
name="Acheteur",
order=5,
)
# 21690123100011
print(dash.page_registry["pages.acheteur"])
layout = [
dcc.Location(id="url", refresh="callback-nav"),
html.Div(
className="container",
children=[
html.H2(id="acheteur_title", children=""),
],
),
]
@callback(
Output(component_id="acheteur_title", component_property="children"),
Input(component_id="url", component_property="pathname"),
)
def update_acheteur(url):
acheteur_siret = url.split("/")[-1]
acheteur_title = acheteur_siret
return acheteur_title