brotherton-erpnext/erpnext/website/page/unsubscribe/unsubscribe.py
2012-02-13 16:50:52 +05:30

10 lines
270 B
Python

import webnotes
@webnotes.whitelist()
def unsubscribe(arg):
"""unsubscribe from lists"""
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!')