Correction for RSS feed user blog
This commit is contained in:
@@ -252,7 +252,7 @@ def viewauthorrss(author):
|
|||||||
cursor = conn.cursor() # Création de l'objet "curseur"
|
cursor = conn.cursor() # Création de l'objet "curseur"
|
||||||
cursor.execute("""SELECT MAX (creation_date) FROM Blog_posts WHERE author=? AND status='public_unified' OR status='public'""", (author, ) )
|
cursor.execute("""SELECT MAX (creation_date) FROM Blog_posts WHERE author=? AND status='public_unified' OR status='public'""", (author, ) )
|
||||||
last_article_date = cursor.fetchone()
|
last_article_date = cursor.fetchone()
|
||||||
cursor.execute("""SELECT title, subtitle, content, creation_date, author, status FROM Blog_posts WHERE author=? AND status='public_unified' OR status='public'""", (author, ) )
|
cursor.execute("""SELECT title_id, title, subtitle, content, creation_date, author, status FROM Blog_posts WHERE author=? AND status='public_unified' OR status='public'""", (author, ) )
|
||||||
list_posts=cursor.fetchall()
|
list_posts=cursor.fetchall()
|
||||||
posts=list()
|
posts=list()
|
||||||
id=0
|
id=0
|
||||||
@@ -262,7 +262,7 @@ def viewauthorrss(author):
|
|||||||
for post in list_posts:
|
for post in list_posts:
|
||||||
posts=[dict(title_id=post[0], title=post[1], subtitle=post[2], content=markdown(post[3], extensions=MARKDOWN_EXT), creation_date=post[4],
|
posts=[dict(title_id=post[0], title=post[1], subtitle=post[2], content=markdown(post[3], extensions=MARKDOWN_EXT), creation_date=post[4],
|
||||||
author=post[5], status=post[6])] + posts
|
author=post[5], status=post[6])] + posts
|
||||||
|
|
||||||
return render_template('blog_rss.xml',
|
return render_template('blog_rss.xml',
|
||||||
base_url=BASE_URL,
|
base_url=BASE_URL,
|
||||||
blog_name=author,
|
blog_name=author,
|
||||||
|
|||||||
Reference in New Issue
Block a user