9 lines
268 B
Python
9 lines
268 B
Python
from django.conf import settings
|
|
import urllib.parse
|
|
|
|
def BASE_URL(request):
|
|
"""
|
|
Return a BASE_URL template context for the current request.
|
|
"""
|
|
parse = urllib.parse.urlparse(settings.BASE_URL)
|
|
return {'BASE_URL': parse.scheme+"://"+parse.netloc, } |