mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
conf migration
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
def on_login(self):
|
||||
from webnotes.utils import validate_email_add
|
||||
import conf
|
||||
from webnotes import conf
|
||||
if hasattr(conf, "demo_notify_url"):
|
||||
if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email):
|
||||
import requests
|
||||
@@ -10,4 +10,4 @@
|
||||
"subject":"Logged into Demo",
|
||||
"sender": webnotes.form_dict.lead_email,
|
||||
"message": "via demo.erpnext.com"
|
||||
})
|
||||
})
|
||||
|
||||
@@ -355,7 +355,7 @@ def how_many(doctype):
|
||||
def install():
|
||||
print "Creating Fresh Database..."
|
||||
from webnotes.install_lib.install import Installer
|
||||
import conf
|
||||
from webnotes import conf
|
||||
inst = Installer('root')
|
||||
inst.import_from_db(conf.demo_db_name, verbose = 1)
|
||||
|
||||
@@ -414,4 +414,4 @@ def import_data(dt, submit=False, overwrite=False):
|
||||
if submit:
|
||||
webnotes.form_dict["params"] = json.dumps({"_submit": 1})
|
||||
webnotes.uploaded_file = os.path.join(os.path.dirname(__file__), "demo_docs", doctype+".csv")
|
||||
upload(overwrite=overwrite)
|
||||
upload(overwrite=overwrite)
|
||||
|
||||
@@ -42,7 +42,7 @@ def make_demo_user():
|
||||
p.doc.last_name = "User"
|
||||
p.doc.enabled = 1
|
||||
p.doc.user_type = "ERPNext Demo"
|
||||
p.doc.send_invite_email = 0
|
||||
# p.doc.send_invite_email = 0
|
||||
p.doc.new_password = "demo"
|
||||
p.insert()
|
||||
add_roles(p)
|
||||
@@ -118,4 +118,4 @@ def make_demo_on_login_script():
|
||||
webnotes.conn.commit()
|
||||
|
||||
if __name__=="__main__":
|
||||
make_demo_app()
|
||||
make_demo_app()
|
||||
|
||||
Reference in New Issue
Block a user