brotherton-erpnext/utilities/demo/demo_control_panel.py

14 lines
508 B
Python
Raw Normal View History

2013-08-26 10:47:50 +00:00
def on_login(self):
from webnotes.utils import validate_email_add
2013-09-21 09:46:47 +00:00
from webnotes import conf
2013-09-24 11:47:39 +00:00
if "demo_notify_url" in conf:
2013-08-26 10:47:50 +00:00
if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email):
import requests
response = requests.post(conf.demo_notify_url, data={
2013-09-17 08:16:50 +00:00
"cmd":"portal.utils.send_message",
2013-08-26 10:47:50 +00:00
"subject":"Logged into Demo",
"sender": webnotes.form_dict.lead_email,
"message": "via demo.erpnext.com"
2013-09-21 09:46:47 +00:00
})