gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-merchant-demos] branch master updated: -try with url_for


From: gnunet
Subject: [taler-taler-merchant-demos] branch master updated: -try with url_for
Date: Wed, 07 Sep 2022 15:09:57 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository taler-merchant-demos.

The following commit(s) were added to refs/heads/master by this push:
     new d7144e0  -try with url_for
d7144e0 is described below

commit d7144e0ee1e991d1ed8019552235d89517a10715
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Sep 7 15:09:55 2022 +0200

    -try with url_for
---
 talermerchantdemos/blog/blog.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py
index 7eb219a..8219d66 100644
--- a/talermerchantdemos/blog/blog.py
+++ b/talermerchantdemos/blog/blog.py
@@ -138,7 +138,7 @@ def internal_error(e):
 def index():
     default = "en"
     target = flask.request.accept_languages.best_match(translations, default)
-    return flask.redirect(url_for (target + "/"), code=302)
+    return flask.redirect(url_for ('index') + target + "/"), code=302)
 
 
 ##
@@ -394,12 +394,12 @@ def article(article_name, lang=None, data=None):
         response.set_cookie(
             "order_id",
             ai,
-            path=urllib.parse.quote(url_for(f"essay/{article_name}"))
+            path=urllib.parse.quote(url_for ('index') + + 
f"essay/{article_name}"))
         )
         response.set_cookie(
             "order_id",
             ai,
-            path=urllib.parse.quote(url_for(f"{lang}/essay/{article_name}"))
+            path=urllib.parse.quote(url_for ('index') + + 
f"{lang}/essay/{article_name}"))
         )
         return response
 
@@ -413,12 +413,12 @@ def article(article_name, lang=None, data=None):
     response.set_cookie(
         "order_id",
         order_id,
-        path=urllib.parse.quote(url_for (f"essay/{article_name}"))
+        path=urllib.parse.quote(url_for ('index') + f"essay/{article_name}"))
     )
     response.set_cookie(
         "order_id",
         order_id,
-        path=urllib.parse.quote(url_for (f"{lang}/essay/{article_name}"))
+        path=urllib.parse.quote(url_for ('index') + 
f"{lang}/essay/{article_name}"))
     )
     return response
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]