aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-09-08 11:39:51 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-09-08 11:39:51 +0200
commitb209008cf64405cf338d004e97b25a3208541080 (patch)
treecaee22c06115084ecbb8ef0c8987fcb39816007d /source
parentLog erros in feedgetter.py (diff)
downloadnewspipe-b209008cf64405cf338d004e97b25a3208541080.tar.gz
newspipe-b209008cf64405cf338d004e97b25a3208541080.tar.bz2
newspipe-b209008cf64405cf338d004e97b25a3208541080.zip
Changed the confirmation message when a new feed has been added.
Diffstat (limited to 'source')
-rwxr-xr-xsource/pyAggr3g470r.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index 956402ce..bec7a9fe 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -490,10 +490,14 @@ class pyAggr3g470r(object):
else:
result = utils.add_feed(feed_url)
# if the feed is not in the file feed.lst
+ import hashlib
+ sha1_hash = hashlib.sha1()
+ sha1_hash.update(feed_url.encode('utf-8'))
+ feed_id = sha1_hash.hexdigest()
if result is False:
- message = "<p>You are already following this feed!</p>"
+ message = """<p>You are already following <a href="/feed/%s">this feed</a>!</p>""" % (feed_id,)
else:
- message = """<p>Feed added. You can now <a href="/fetch/">fetch your feeds</a>.</p>"""
+ message = """<p><a href="/feed/%s">Feed added</a>. You can now <a href="/fetch/">fetch your feeds</a>.</p>""" % (feed_id,)
tmpl = lookup.get_template("confirmation.html")
return tmpl.render(message=message)
bgstack15