added get_site_address method to website's init
diff --git a/website/__init__.py b/website/__init__.py
index dbf65dd..0796fb4 100644
--- a/website/__init__.py
+++ b/website/__init__.py
@@ -23,4 +23,16 @@
webnotes.msgprint('Please give us your email id so that we can write back to you', raise_exception=True)
d.save()
- webnotes.msgprint('Thank you!')
\ No newline at end of file
+ webnotes.msgprint('Thank you!')
+
+def get_site_address():
+ from webnotes.utils import get_request_site_address
+ url = get_request_site_address()
+
+ if not url or url=='http://localhost':
+ new_url = webnotes.conn.get_value('Website Settings', 'Website Settings',
+ 'subdomain')
+ if new_url:
+ url = "http://" + new_url
+
+ return url
\ No newline at end of file