[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant-frontends] 02/02: add frame around plain ar
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant-frontends] 02/02: add frame around plain articles |
Date: |
Mon, 13 Feb 2017 11:25:39 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository merchant-frontends.
commit 70175e0853c16a97830a9f06ea61a4e53689c492
Author: Florian Dold <address@hidden>
AuthorDate: Mon Feb 13 11:25:34 2017 +0100
add frame around plain articles
---
talerfrontends/blog/blog.py | 2 +-
talerfrontends/blog/content.py | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/talerfrontends/blog/blog.py b/talerfrontends/blog/blog.py
index 1acfa80..4d2142e 100644
--- a/talerfrontends/blog/blog.py
+++ b/talerfrontends/blog/blog.py
@@ -124,7 +124,7 @@ def article(name, data=None):
return flask.send_file(get_image_file(data))
else:
return "permission denied", 400
- return flask.send_file(get_article_file(article))
+ return flask.render_template('templates/article_frame.html',
article_file=get_article_file(article))
contract_url = make_url("/generate-contract", ("article_name",name))
response =
flask.make_response(flask.render_template('templates/fallback.html'), 402)
diff --git a/talerfrontends/blog/content.py b/talerfrontends/blog/content.py
index 48010b8..1c9e98d 100644
--- a/talerfrontends/blog/content.py
+++ b/talerfrontends/blog/content.py
@@ -44,10 +44,7 @@ def get_image_file(image):
def get_article_file(article):
f = resource_filename("talerfrontends", article.main_file)
- # Following two lines are for debug?
- rs = resource_stream("talerfrontends", article.main_file)
- print("RESOURCE STREAM", rs)
- return os.path.abspath(f)
+ return os.path.basename(f)
def add_from_html(resource_name, teaser_paragraph=0, title=None):
--
To stop receiving notification emails like this one, please contact
address@hidden