mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
added get_site_address method to website's init
This commit is contained in:
@@ -23,4 +23,16 @@ def send_message():
|
||||
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!')
|
||||
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
|
||||
Reference in New Issue
Block a user