[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-merchant-demos] branch master updated: Adapt survey site.
From: |
gnunet |
Subject: |
[taler-taler-merchant-demos] branch master updated: Adapt survey site. |
Date: |
Fri, 24 Jul 2020 14:31:36 +0200 |
This is an automated email from the git hooks/post-receive script.
ms 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 50826ee Adapt survey site.
50826ee is described below
commit 50826ee741b56a53c963778f7cf9a58eec547960
Author: MS <ms@taler.net>
AuthorDate: Fri Jul 24 14:31:26 2020 +0200
Adapt survey site.
---
talermerchantdemos/blog/blog.py | 3 +--
talermerchantdemos/survey/survey.py | 19 +++----------------
talermerchantdemos/survey/templates/index.html | 2 +-
3 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py
index f27d777..0aa7987 100644
--- a/talermerchantdemos/blog/blog.py
+++ b/talermerchantdemos/blog/blog.py
@@ -43,9 +43,8 @@ TC = TalerConfig.from_env()
BACKEND_BASE_URL = TC["frontends"]["backend"].value_string(required=True)
CURRENCY = TC["taler"]["currency"].value_string(required=True)
APIKEY = TC["frontends"]["backend_apikey"].value_string(required=True)
-INSTANCE = "blog"
ARTICLE_AMOUNT = CURRENCY + ":0.5"
-BACKEND_URL = urljoin(BACKEND_BASE_URL, f"instances/{INSTANCE}/")
+BACKEND_URL = urljoin(BACKEND_BASE_URL, "instances/blog/")
app.config.from_object(__name__)
diff --git a/talermerchantdemos/survey/survey.py
b/talermerchantdemos/survey/survey.py
index 52e4ede..15cb08c 100644
--- a/talermerchantdemos/survey/survey.py
+++ b/talermerchantdemos/survey/survey.py
@@ -40,8 +40,7 @@ CURRENCY = TC["taler"]["currency"].value_string(required=True)
APIKEY = TC["frontends"]["backend_apikey"].value_string(required=True)
app.config.from_object(__name__)
LOGGER = logging.getLogger(__name__)
-INSTANCED_URL = urljoin(BACKEND_URL, "/survey")
-
+INSTANCED_URL = urljoin(BACKEND_URL, f"instances/survey")
##
# Make the environment available into templates.
@@ -92,18 +91,6 @@ def favicon():
mimetype="image/vnd.microsoft.ico"
)
-
-##
-# Give information about the tip reserve status.
-#
-# @return the backend response to a /tip-query request,
-# in a prettified format.
-@app.route("/survey-stats", methods=["GET"])
-def survey_stats():
- stats = backend_get(INSTANCED_URL, "tip-query", params=dict())
- return flask.render_template("templates/survey_stats.html", stats=stats)
-
-
def get_qrcode_svg(data):
factory = qrcode.image.svg.SvgImage
img = qrcode.make(data, image_factory=factory)
@@ -133,8 +120,8 @@ def submit_survey():
next_url=os.environ.get("TALER_ENV_URL_INTRO", "https://taler.net/"),
justification="Payment methods survey"
)
- backend_resp = backend_post(INSTANCED_URL, "tip-authorize", tip_spec)
- taler_tip_uri = backend_resp.get("taler_tip_uri")
+ backend_resp = backend_post(INSTANCED_URL, "private/tips", tip_spec)
+ taler_tip_uri = backend_resp.get("tip_redirect_url")
if taler_tip_uri:
qrcode_svg = get_qrcode_svg(taler_tip_uri)
content = flask.render_template(
diff --git a/talermerchantdemos/survey/templates/index.html
b/talermerchantdemos/survey/templates/index.html
index e58e669..f40c235 100644
--- a/talermerchantdemos/survey/templates/index.html
+++ b/talermerchantdemos/survey/templates/index.html
@@ -4,7 +4,7 @@
<div>
<p>
In this page, you can participate in our survey about payment systems
- and get a nice tip - via your Taler wallet - from this shop! <a href={{
url_for('survey_stats') }}>(survey stats)</a>
+ and get a nice tip - via your Taler wallet - from this shop!
</p>
</div>
<div>
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-merchant-demos] branch master updated: Adapt survey site.,
gnunet <=