conf migration

This commit is contained in:
Pratik Vyas
2013-09-21 15:16:47 +05:30
parent 7782e83d33
commit cfed8c44b4
8 changed files with 14 additions and 14 deletions

View File

@@ -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)

View File

@@ -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,
'<i>"' + doc.comment + '"</i>', '#6B24B3')