brotherton-erpnext/erpnext/website/page/unsubscribe/unsubscribe.py

8 lines
248 B
Python
Raw Normal View History

2012-01-27 12:30:14 +00:00
def unsubscribe(arg):
"""unsubscribe from lists"""
import webnotes
lists = [['Blog Subscriber', 'name']]
for l in lists:
webnotes.conn.sql("""delete from `tab%s` where %s=%s""" % (l[0], l[1], '%s'), arg)
webnotes.msgprint('Unsubscribed!')