Add title_id for landing page

This commit is contained in:
2026-03-22 20:46:45 +01:00
parent 17a3bc0677
commit 0f2ff1b0ae

View File

@@ -90,14 +90,14 @@ def login():
else:
conn = sqlite3.connect(DATABASE) # Connexion à la base de donnée
cursor = conn.cursor() # Création de l'objet "curseur"
cursor.execute("""SELECT title, subtitle, creation_date, last_updated, author FROM Blog_posts WHERE status='public_unified'""" )
cursor.execute("""SELECT title_id, title, subtitle, creation_date, last_updated, author FROM Blog_posts WHERE status='public_unified'""" )
list_posts=cursor.fetchall()
posts=list()
id=0
conn.close()
if list_posts != None:
for post in list_posts:
posts=[dict(title=post[0], subtitle=post[1], creation_date=post[2], last_updated=post[3], author=post[4])] + posts
posts=[dict(title_id[0], title=post[1], subtitle=post[2], creation_date=post[3], last_updated=post[4], author=post[5])] + posts
resp = render_template('accueil.html',
server_title=SERVER_TITLE,