diff --git a/setup/doctype/backup_manager/backup_googledrive.py b/setup/doctype/backup_manager/backup_googledrive.py index 5d7b6ad0fa..ee795186da 100644 --- a/setup/doctype/backup_manager/backup_googledrive.py +++ b/setup/doctype/backup_manager/backup_googledrive.py @@ -113,7 +113,7 @@ def backup_to_gdrive(): def get_gdrive_flow(): from oauth2client.client import OAuth2WebServerFlow - import conf + from webnotes import conf if not hasattr(conf, "gdrive_client_id"): webnotes.msgprint(_("Please set Google Drive access keys in") + " conf.py", @@ -169,4 +169,4 @@ def create_folder(name, service, folder_id): return database['id'] if __name__=="__main__": - backup_to_gdrive() \ No newline at end of file + backup_to_gdrive() diff --git a/setup/doctype/email_digest/email_digest.py b/setup/doctype/email_digest/email_digest.py index 39e377a601..2a9acaa8b9 100644 --- a/setup/doctype/email_digest/email_digest.py +++ b/setup/doctype/email_digest/email_digest.py @@ -457,7 +457,7 @@ def send(): from webnotes.utils import getdate now_date = now_datetime().date() - import conf + from webnotes import conf if hasattr(conf, "expires_on") and now_date > getdate(conf.expires_on): # do not send email digests to expired accounts return diff --git a/startup/boot.py b/startup/boot.py index 886b805db4..20887f720c 100644 --- a/startup/boot.py +++ b/startup/boot.py @@ -32,7 +32,7 @@ def boot_session(bootinfo): # load subscription info - import conf + from webnotes import conf for key in ['max_users', 'expires_on', 'max_space', 'status', 'commercial_support']: if hasattr(conf, key): bootinfo[key] = getattr(conf, key) @@ -53,4 +53,4 @@ def get_letter_heads(): ret = webnotes.conn.sql("""select name, content from `tabLetter Head` where ifnull(disabled,0)=0""") return dict(ret) - \ No newline at end of file + diff --git a/startup/event_handlers.py b/startup/event_handlers.py index 57345f3ca0..a333857b1b 100644 --- a/startup/event_handlers.py +++ b/startup/event_handlers.py @@ -39,7 +39,7 @@ def on_logout(login_manager): def check_if_expired(): """check if account is expired. If expired, do not allow login""" - import conf + from webnotes import conf # check if expires_on is specified if not hasattr(conf, 'expires_on'): return @@ -75,4 +75,4 @@ def comment_added(doc): """add comment to feed""" home.make_feed('Comment', doc.comment_doctype, doc.comment_docname, doc.comment_by, '"' + doc.comment + '"', '#6B24B3') - \ No newline at end of file + diff --git a/support/doctype/newsletter/newsletter.py b/support/doctype/newsletter/newsletter.py index 9a27d839f8..13ad47a0d8 100644 --- a/support/doctype/newsletter/newsletter.py +++ b/support/doctype/newsletter/newsletter.py @@ -90,7 +90,7 @@ class DocType(): webnotes.msgprint(_("""Please save the Newsletter before sending."""), raise_exception=1) - import conf + from webnotes import conf if getattr(conf, "status", None) == "Trial": webnotes.msgprint(_("""Sending newsletters is not allowed for Trial users, \ to prevent abuse of this feature."""), raise_exception=1) diff --git a/utilities/demo/demo_control_panel.py b/utilities/demo/demo_control_panel.py index 1f381d5eb6..1da690245c 100644 --- a/utilities/demo/demo_control_panel.py +++ b/utilities/demo/demo_control_panel.py @@ -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" - }) \ No newline at end of file + }) diff --git a/utilities/demo/make_demo.py b/utilities/demo/make_demo.py index a526c2a301..883186791a 100644 --- a/utilities/demo/make_demo.py +++ b/utilities/demo/make_demo.py @@ -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) \ No newline at end of file + upload(overwrite=overwrite) diff --git a/utilities/demo/make_erpnext_demo.py b/utilities/demo/make_erpnext_demo.py index 766da2612f..70e7322ea8 100644 --- a/utilities/demo/make_erpnext_demo.py +++ b/utilities/demo/make_erpnext_demo.py @@ -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() \ No newline at end of file + make_demo_app()