get_site_name without the port
This commit is contained in:
parent
459bd6b764
commit
1e22f94905
2 changed files with 5 additions and 1 deletions
|
|
@ -24,7 +24,8 @@ def application(request):
|
|||
webnotes.local.request = request
|
||||
|
||||
try:
|
||||
webnotes.init(site=request.host)
|
||||
site = webnotes.utils.get_site_name(request.host)
|
||||
webnotes.init(site=site)
|
||||
|
||||
webnotes.local.form_dict = webnotes._dict({ k:v[0] if isinstance(v, (list, tuple)) else v \
|
||||
for k, v in (request.form or request.args).iteritems() })
|
||||
|
|
|
|||
|
|
@ -901,3 +901,6 @@ def compare(val1, condition, val2):
|
|||
return operator_map[condition]((val1, val2))
|
||||
|
||||
return False
|
||||
|
||||
def get_site_name(hostname):
|
||||
return hostname.split(':')[0]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue