Anand Doshi | 486f9df | 2012-07-19 13:40:31 +0530 | [diff] [blame] | 1 | from __future__ import unicode_literals |
Rushabh Mehta | c01b7e9 | 2012-03-21 12:29:56 +0530 | [diff] [blame] | 2 | install_docs = [ |
Anand Doshi | 24e1856 | 2012-04-17 11:45:35 +0530 | [diff] [blame] | 3 | {"doctype":"Role", "role_name":"Blogger", "name":"Blogger"}, |
| 4 | {"doctype":"Role", "role_name":"Website Manager", "name":"Website Manager"}, |
| 5 | ] |
Rushabh Mehta | 389880d | 2012-04-27 18:39:14 +0530 | [diff] [blame] | 6 | |
| 7 | import webnotes |
| 8 | |
Anand Doshi | 7aedaec | 2012-10-16 10:47:18 +0530 | [diff] [blame] | 9 | |
| 10 | def get_site_address(): |
| 11 | from webnotes.utils import get_request_site_address |
| 12 | url = get_request_site_address() |
| 13 | |
| 14 | if not url or url=='http://localhost': |
| 15 | new_url = webnotes.conn.get_value('Website Settings', 'Website Settings', |
| 16 | 'subdomain') |
| 17 | if new_url: |
| 18 | url = "http://" + new_url |
| 19 | |
| 20 | return url |