diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-09-08 11:39:51 +0200 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-09-08 11:39:51 +0200 |
commit | b209008cf64405cf338d004e97b25a3208541080 (patch) | |
tree | caee22c06115084ecbb8ef0c8987fcb39816007d | |
parent | Log erros in feedgetter.py (diff) | |
download | newspipe-b209008cf64405cf338d004e97b25a3208541080.tar.gz newspipe-b209008cf64405cf338d004e97b25a3208541080.tar.bz2 newspipe-b209008cf64405cf338d004e97b25a3208541080.zip |
Changed the confirmation message when a new feed has been added.
-rwxr-xr-x | source/pyAggr3g470r.py | 8 |
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) |