conf migration
This commit is contained in:
parent
7782e83d33
commit
cfed8c44b4
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user