9 lines
250 B
Python
9 lines
250 B
Python
def BASE_URL(request):
|
|
"""
|
|
Return a BASE_URL template context for the current request.
|
|
"""
|
|
if request.is_secure():
|
|
scheme = 'https://'
|
|
else:
|
|
scheme = 'http://'
|
|
return {'BASE_URL': scheme + request.get_host(), } |