您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

15 行
468 B

  1. from __future__ import unicode_literals
  2. def get_home_page(user=None):
  3. """get home page for user"""
  4. if not user:
  5. user = 'Guest'
  6. import webnotes
  7. hpl = webnotes.conn.sql("""select home_page
  8. from `tabDefault Home Page`
  9. where parent='Control Panel'
  10. and role in ('%s') order by idx asc limit 1""" % "', '".join(webnotes.get_roles(user)))
  11. if hpl:
  12. return hpl[0][0]
  13. else:
  14. return webnotes.conn.get_value('Control Panel',None,'home_page') or 'Login Page'