You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 line
521 B

  1. from __future__ import unicode_literals
  2. install_docs = [
  3. {"doctype":"Role", "role_name":"Blogger", "name":"Blogger"},
  4. {"doctype":"Role", "role_name":"Website Manager", "name":"Website Manager"},
  5. ]
  6. import webnotes
  7. def get_site_address():
  8. from webnotes.utils import get_request_site_address
  9. url = get_request_site_address()
  10. if not url or url=='http://localhost':
  11. new_url = webnotes.conn.get_value('Website Settings', 'Website Settings',
  12. 'subdomain')
  13. if new_url:
  14. url = "http://" + new_url
  15. return url