Fixed context_processor
This commit is contained in:
parent
a7bbd79cf3
commit
e2028bbe48
@ -7,9 +7,10 @@ def BASE_URL(request):
|
|||||||
else:
|
else:
|
||||||
scheme = 'http://'
|
scheme = 'http://'
|
||||||
fullhost = request.get_host()
|
fullhost = request.get_host()
|
||||||
port = fullhost.split(":")[1]
|
host = fullhost.split(":")[0]
|
||||||
|
port = request.get_port()
|
||||||
if port == 80 or port == 443:
|
if port == 80 or port == 443:
|
||||||
base = fullhost.split(":")[0]
|
base = host
|
||||||
else:
|
else:
|
||||||
base = fullhost
|
base = host+":"+port
|
||||||
return {'BASE_URL': scheme + base, }
|
return {'BASE_URL': scheme + base, }
|
Loading…
Reference in New Issue
Block a user