mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 05:59:18 +00:00
[minor] fixes for import conf
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
def on_login(self):
|
||||
from webnotes.utils import validate_email_add
|
||||
from webnotes import conf
|
||||
if hasattr(conf, "demo_notify_url"):
|
||||
if "demo_notify_url" in conf:
|
||||
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={
|
||||
|
||||
@@ -36,11 +36,15 @@ def make(reset=False, simulate=True):
|
||||
|
||||
if reset:
|
||||
setup()
|
||||
else:
|
||||
webnotes.connect()
|
||||
|
||||
if simulate:
|
||||
_simulate()
|
||||
|
||||
|
||||
def setup():
|
||||
install()
|
||||
webnotes.connect()
|
||||
complete_setup()
|
||||
make_customers_suppliers_contacts()
|
||||
make_items()
|
||||
|
||||
@@ -5,9 +5,9 @@ if __name__=="__main__":
|
||||
import webnotes, os
|
||||
import utilities.demo.make_demo
|
||||
|
||||
def make_demo_app():
|
||||
def make_demo_app(site=None):
|
||||
webnotes.mute_emails = 1
|
||||
webnotes.connect()
|
||||
webnotes.connect(site)
|
||||
utilities.demo.make_demo.make(reset=True, simulate=False)
|
||||
# setup demo user etc so that the site it up faster, while the data loads
|
||||
make_demo_user()
|
||||
|
||||
Reference in New Issue
Block a user