gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-survey] branch master updated: returning backend dat


From: gnunet
Subject: [GNUnet-SVN] [taler-survey] branch master updated: returning backend data as stringified header
Date: Tue, 28 Nov 2017 12:42:11 +0100

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

marcello pushed a commit to branch master
in repository survey.

The following commit(s) were added to refs/heads/master by this push:
     new 3eff171  returning backend data as stringified header
3eff171 is described below

commit 3eff171197018323756b50fc8b61bb4a9fcda428
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Nov 28 12:41:36 2017 +0100

    returning backend data as stringified header
---
 talersurvey/survey/survey.py           | 13 ++++++-------
 talersurvey/survey/templates/wait.html |  7 +++++++
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/talersurvey/survey/survey.py b/talersurvey/survey/survey.py
index cf90e2f..6fcbbe7 100644
--- a/talersurvey/survey/survey.py
+++ b/talersurvey/survey/survey.py
@@ -93,12 +93,11 @@ def survey():
         else:
             success = True
 
-    response = 
flask.make_response(flask.render_template("templates/index.html", 
success=success), 402)
-    response.headers["X-Taler-Tipping-Url"] = urljoin(
-        flask.request.base_url,
-        flask.url_for("pick", tip_id=r.json().get("tip_id")))
-    response.headers["X-Taler-Tipping-Exchange"] = r.json().get("exchange_uri")
-    response.headers["X-Taler-Tipping-Amount"] = amount.stringify(2)
-    response.headers["X-Taler-Tipping-Deadline"] = r.json().get("expiration")
+    response = flask.make_response(flask.render_template(
+            "templates/wait.html",
+           success=success),
+       402)
+    tip_header = r.json().update({"pickup_url": 
urljoin(flask.request.base_url, "/pick")})
+    response.headers["X-Taler-Tip"] = json.dumps(tip_header)
 
     return response
diff --git a/talersurvey/survey/templates/wait.html 
b/talersurvey/survey/templates/wait.html
new file mode 100644
index 0000000..81dd36a
--- /dev/null
+++ b/talersurvey/survey/templates/wait.html
@@ -0,0 +1,7 @@
+{% extends "templates/base.html" %}
+
+{% block main %}
+  <p>
+    Please wait while the tip is being generated..
+  </p>
+{% endblock %}

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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