diff --git a/views/loginlogout.py b/views/loginlogout.py index 91e650b..2ece554 100644 --- a/views/loginlogout.py +++ b/views/loginlogout.py @@ -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,