Rushabh Mehta | f17ce7b | 2012-02-13 16:50:52 +0530 | [diff] [blame] | 1 | import webnotes |
2 | |||||
3 | @webnotes.whitelist() | ||||
Rushabh Mehta | 3a751e8 | 2012-01-27 18:00:14 +0530 | [diff] [blame] | 4 | def unsubscribe(arg): |
5 | """unsubscribe from lists""" | ||||
Rushabh Mehta | 3a751e8 | 2012-01-27 18:00:14 +0530 | [diff] [blame] | 6 | lists = [['Blog Subscriber', 'name']] |
7 | for l in lists: | ||||
8 | webnotes.conn.sql("""delete from `tab%s` where %s=%s""" % (l[0], l[1], '%s'), arg) | ||||
9 | |||||
10 | webnotes.msgprint('Unsubscribed!') |