From: Drew Fisher Date: Thu, 14 Apr 2011 19:13:56 +0000 (-0500) Subject: Add a checkbox to not receive follow-up emails. X-Git-Url: http://git.zarvox.org/shortlog/static/%7B%7B%20url_for%28%27main.login_page%27%29%20%7D%7D?a=commitdiff_plain;h=b55717e4371efdd7d0c36b0b1359963632aa8b24;p=shortlog.git Add a checkbox to not receive follow-up emails. If the user clicks the checkbox, the text " noreply" will be appended to the email address line in the pending comment written out to disk. Signed-off-by: Drew Fisher --- diff --git a/shortlog.py b/shortlog.py index 122553d..aa45f10 100644 --- a/shortlog.py +++ b/shortlog.py @@ -153,6 +153,9 @@ class day: return name = i.name.strip() email = i.email.strip() + wantsreply = True + if 'wantsreply' in i: + wantsreply = False website = i.website.strip() if website != "" and not website.startswith("http"): website = "http://" + website @@ -166,7 +169,10 @@ class day: break f = open(fname, "a+") f.write(name + "\n") - f.write(email + "\n") + if wantsreply: + f.write(email + "\n") + else: + f.write(email + " noreply\n") f.write(website + "\n") f.write(timestamp + "\n") f.write(comment + "\n") diff --git a/templates/day.html b/templates/day.html index cf931b2..2c9afb4 100644 --- a/templates/day.html +++ b/templates/day.html @@ -37,6 +37,7 @@ $for c in comments:

Website (optional)

Antispam: enter a four digit number

+

Don't email me updates to comments