Correction for new blog system

This commit is contained in:
2026-03-22 21:31:13 +01:00
parent 0f84afc99a
commit f5d8636f1d
5 changed files with 9 additions and 9 deletions

View File

@@ -61,7 +61,7 @@
</div>
<a href="/blog/public_unified/{{ article.author }}/{{ article.title_id }}"> <button> Lire la suite </button> </a>
<a href="{{ url_for('blog.viewArticle', username=article.author, title_id=article.title_id) }}"> <button> Lire la suite </button> </a>
</article>

View File

@@ -18,8 +18,8 @@
<item>
<title> {{ post.title }} </title>
<pubdate> {% if post.last_updated %} {{ post.last_updated }} {% else %} {{ post.time }} {% endif %} </pubdate>
<link> {{base_url}}/blog/{{ post.status }}/{{post.author}}/{{post.title_id}}</link>
<guid> {{base_url}}/blog/{{ post.status }}/{{post.author}}/{{post.title_id}}</guid>
<link> {{base_url}}/{{ url_for('blog.viewArticle', username=post.author, title_id=post.title_id) }}</link>
<guid> {{base_url}}/{{ url_for('blog.viewArticle', username=post.author, title_id=post.title_id) }} </guid>
<description>
{{ post.subtitle }}

View File

@@ -33,7 +33,7 @@
</small>
<div class="slug">
<p> {{ post.subtitle }} </p>
<p class="readmore"> <a style="margin-right:2rem;" href="/blog/{{ post.status }}/{{post.author}}/{{post.title_id}}"> Lire la suite... </a></p>
<p class="readmore"> <a style="margin-right:2rem;" href="{{ url_for('blog.viewArticle', username=post.author, title_id=post.title_id) }}"> Lire la suite... </a></p>
</div>
{% endfor %}
</div>

View File

@@ -38,7 +38,7 @@
</small>
<div class="slug">
<p> {{ post.subtitle }} </p>
<p class="readmore"> <a style="margin-right:2rem;" href="/blog/{{ post.status }}/{{post.author}}/{{post.title_id}}"> Lire la suite... </a></p>
<p class="readmore"> <a style="margin-right:2rem;" href="{{ url_for('blog.viewArticle', username=post.author, title_id=post.title_id) }}"> Lire la suite... </a></p>
</div>
{% endfor %}
</div>

View File

@@ -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)
@@ -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/<username>/<title_id>', methods=['GET'])