taler-merchant-demos

Python-based Frontends for the Demonstration Web site
Log | Files | Refs | Submodules | README | LICENSE

commit 36e1b2b54d95e0beb422997f47e9d29a471c8d33
parent f90d7075c846d2a40c0f1b2b5022352f886db2df
Author: Florian Dold <florian@dold.me>
Date:   Thu, 27 Jan 2022 21:52:18 +0100

use article name instead slug

Diffstat:
Mtalermerchantdemos/blog/blog.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py @@ -279,7 +279,7 @@ def render_article(article_name, lang, data, order_id, refundable): return flask.render_template( "blog-article-frame.html.j2", article_contents=article_contents, - article_name=article_name, + article_name=article_info.title, order_id=order_id, refundable=refundable, ) @@ -292,8 +292,8 @@ def render_article(article_name, lang, data, order_id, refundable): # @param lang which language to use # def post_order(article_name, lang): - name_decoded = urllib.parse.unquote(article_name).replace("_", " ") - summary = f"Essay: {name_decoded}" + article_info = ARTICLES[lang].get(article_name) + summary = f"Essay: {article_info.title}" order = dict( amount=ARTICLE_AMOUNT, extra=dict(article_name=article_name),