Merge branch 'feature/39_meta' into dev
This commit is contained in:
@@ -38,7 +38,8 @@ python run.py
|
|||||||
|
|
||||||
#### 2.1.0
|
#### 2.1.0
|
||||||
|
|
||||||
- Ajout de la vue acheteur
|
- Ajout des vues [acheteur](https://decp.info/acheteurs/24350013900189) et [fournisseur](https://decp.info/fournisseurs/51903758414786) ([#28](https://github.com/ColinMaudry/decp.info/issues/28) et [#35](https://github.com/ColinMaudry/decp.info/issues/35))
|
||||||
|
- Ajout des balises HTML meta Open Graph et Twitter ([#39](https://github.com/ColinMaudry/decp.info/issues/39)) pour de beaux aperçus de liens
|
||||||
- Variables globales uniquement en lecture
|
- Variables globales uniquement en lecture
|
||||||
|
|
||||||
##### 2.0.1 (23 septembre 2025)
|
##### 2.0.1 (23 septembre 2025)
|
||||||
|
|||||||
+40
@@ -1,14 +1,54 @@
|
|||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
import dash_bootstrap_components as dbc
|
import dash_bootstrap_components as dbc
|
||||||
from dash import Dash, dcc, html, page_container, page_registry
|
from dash import Dash, dcc, html, page_container, page_registry
|
||||||
|
from dotenv import load_dotenv
|
||||||
from flask import send_from_directory
|
from flask import send_from_directory
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
|
domain_name = (
|
||||||
|
"test.decp.info" if os.getenv("DEVELOPMENT").lower() == "true" else "decp.info"
|
||||||
|
)
|
||||||
|
image_url = f"https://{domain_name}/assets/decp.info.png"
|
||||||
|
title = "decp.info - exploration des marchés publics français"
|
||||||
|
description = (
|
||||||
|
"Explorez et analysez les données des marchés publics français avec cet outil libre et gratuit. "
|
||||||
|
"Pour une commande publique accessible à toutes et tous."
|
||||||
|
)
|
||||||
|
|
||||||
app = Dash(
|
app = Dash(
|
||||||
external_stylesheets=[dbc.themes.SIMPLEX],
|
external_stylesheets=[dbc.themes.SIMPLEX],
|
||||||
title="decp.info",
|
title="decp.info",
|
||||||
use_pages=True,
|
use_pages=True,
|
||||||
compress=True,
|
compress=True,
|
||||||
|
meta_tags=[
|
||||||
|
{
|
||||||
|
"property": "og:image",
|
||||||
|
"content": image_url,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "twitter:image",
|
||||||
|
"content": image_url,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"property": "og:title",
|
||||||
|
"content": title,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "twitter:title",
|
||||||
|
"content": title,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"property": "og:description",
|
||||||
|
"content": description,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "twitter:description",
|
||||||
|
"content": description,
|
||||||
|
},
|
||||||
|
],
|
||||||
)
|
)
|
||||||
# COSMO (belle font, blue),
|
# COSMO (belle font, blue),
|
||||||
# UNITED (rouge, ubuntu font),
|
# UNITED (rouge, ubuntu font),
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from dash import dcc, html, register_page
|
from dash import dcc, html, register_page
|
||||||
from dotenv import load_dotenv
|
|
||||||
|
|
||||||
from src.figures import get_sources_tables
|
from src.figures import get_sources_tables
|
||||||
|
|
||||||
title = "À propos"
|
title = "À propos"
|
||||||
|
|
||||||
load_dotenv()
|
|
||||||
|
|
||||||
register_page(
|
register_page(
|
||||||
__name__, path="/a-propos", title=f"decp.info - {title}", name=title, order=5
|
__name__, path="/a-propos", title=f"decp.info - {title}", name=title, order=5
|
||||||
)
|
)
|
||||||
|
|||||||
+8
-3
@@ -3,7 +3,6 @@ from datetime import datetime
|
|||||||
|
|
||||||
import polars as pl
|
import polars as pl
|
||||||
from dash import Input, Output, State, callback, dash_table, dcc, html, register_page
|
from dash import Input, Output, State, callback, dash_table, dcc, html, register_page
|
||||||
from dotenv import load_dotenv
|
|
||||||
|
|
||||||
from src.utils import (
|
from src.utils import (
|
||||||
add_org_links,
|
add_org_links,
|
||||||
@@ -14,8 +13,6 @@ from src.utils import (
|
|||||||
sort_table_data,
|
sort_table_data,
|
||||||
)
|
)
|
||||||
|
|
||||||
load_dotenv()
|
|
||||||
|
|
||||||
update_date = os.path.getmtime(os.getenv("DATA_FILE_PARQUET_PATH"))
|
update_date = os.path.getmtime(os.getenv("DATA_FILE_PARQUET_PATH"))
|
||||||
update_date = datetime.fromtimestamp(update_date).strftime("%d/%m/%Y")
|
update_date = datetime.fromtimestamp(update_date).strftime("%d/%m/%Y")
|
||||||
|
|
||||||
@@ -56,6 +53,14 @@ datatable = html.Div(
|
|||||||
"lineHeight": "14px",
|
"lineHeight": "14px",
|
||||||
"whiteSpace": "normal",
|
"whiteSpace": "normal",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"if": {"column_id": "titulaire_nom"},
|
||||||
|
"minWidth": "250px",
|
||||||
|
"textAlign": "left",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"lineHeight": "14px",
|
||||||
|
"whiteSpace": "normal",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
data_timestamp=0,
|
data_timestamp=0,
|
||||||
markdown_options={"html": True},
|
markdown_options={"html": True},
|
||||||
|
|||||||
@@ -5,12 +5,9 @@ from time import sleep
|
|||||||
|
|
||||||
import polars as pl
|
import polars as pl
|
||||||
import polars.selectors as cs
|
import polars.selectors as cs
|
||||||
from dotenv import load_dotenv
|
|
||||||
from httpx import get
|
from httpx import get
|
||||||
from polars.exceptions import ComputeError
|
from polars.exceptions import ComputeError
|
||||||
|
|
||||||
load_dotenv()
|
|
||||||
|
|
||||||
operators = [
|
operators = [
|
||||||
["s<", "<"],
|
["s<", "<"],
|
||||||
["s>", ">"],
|
["s>", ">"],
|
||||||
|
|||||||
Reference in New Issue
Block a user