diff --git a/templates/accueil.html b/templates/accueil.html
index 844ecb5..9005086 100644
--- a/templates/accueil.html
+++ b/templates/accueil.html
@@ -61,7 +61,7 @@
-
+
diff --git a/templates/blog_rss.xml b/templates/blog_rss.xml
index c78be60..d456152 100644
--- a/templates/blog_rss.xml
+++ b/templates/blog_rss.xml
@@ -18,8 +18,8 @@
-
{{ post.title }}
{% if post.last_updated %} {{ post.last_updated }} {% else %} {{ post.time }} {% endif %}
- {{base_url}}/blog/{{ post.status }}/{{post.author}}/{{post.title_id}}
- {{base_url}}/blog/{{ post.status }}/{{post.author}}/{{post.title_id}}
+ {{base_url}}/{{ url_for('blog.viewArticle', username=post.author, title_id=post.title_id) }}
+ {{base_url}}/{{ url_for('blog.viewArticle', username=post.author, title_id=post.title_id) }}
{{ post.subtitle }}
diff --git a/templates/index_author_blog.html b/templates/index_author_blog.html
index 99b5399..8cab39f 100644
--- a/templates/index_author_blog.html
+++ b/templates/index_author_blog.html
@@ -33,7 +33,7 @@
{% endfor %}
diff --git a/templates/index_blog.html b/templates/index_blog.html
index 61b42de..1b073de 100644
--- a/templates/index_blog.html
+++ b/templates/index_blog.html
@@ -38,7 +38,7 @@
{% endfor %}
diff --git a/views/blog.py b/views/blog.py
index fd45792..deb0f38 100644
--- a/views/blog.py
+++ b/views/blog.py
@@ -203,7 +203,7 @@ def view_internal():
id=0
if list_posts != None:
for post in list_posts:
- posts = [dict(title_id=[0], title=post[1], subtitle=post[2], content=post[3], creation_date=post[4], last_updated=post[5], author=post[6], status=post[7] )] + posts
+ posts = [dict(title_id=post[0], title=post[1], subtitle=post[2], content=post[3], creation_date=post[4], last_updated=post[5], author=post[6], status=post[7] )] + posts
else:
return redirect(BASE_URL, code=404)
@@ -231,7 +231,7 @@ def viewuser(author):
conn = sqlite3.connect(DATABASE) # Connexion à la base de donnée
cursor = conn.cursor() # Création de l'objet "curseur"
if 'username' in session :
- cursor.execute("""SELECT title_id, title, subtitle, creation_date, last_updated, author, status FROM Blog_posts WHERE author=? AND status != 'draft' """, (author,))
+ cursor.execute("""SELECT title_id, title, subtitle, creation_date, last_updated, author, status FROM Blog_posts WHERE author=? AND status!='draft' """, (author,))
else:
cursor.execute("""SELECT title_id, title, subtitle, creation_date, last_updated, author, status FROM Blog_posts WHERE author=? AND status='public' OR status='public_unified' """, (author,))
list_posts=cursor.fetchall()
@@ -260,7 +260,7 @@ def viewauthorrss(author):
if list_posts != None:
last_build=last_article_date[0]
for post in list_posts:
- posts=[dict(title_id[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
return render_template('blog_rss.xml',
@@ -285,7 +285,7 @@ def viewPrivateArticle(username, title_id):
content = markdown(post[3], extensions=MARKDOWN_EXT)
return render_template('blog.html', post_info=post_info, content=content)
else:
- return redirect(url_for('blog'), code=404)
+ return redirect(url_for('login'), code=404)
@blog.route('/blog/public_unified//', methods=['GET'])