expephalon-chat/core/helpers/urls.py

6 lines
No EOL
200 B
Python

from urllib.parse import urljoin
from dbsettings.functions import getValue
def relative_to_absolute(path, domain=getValue("core.base_url", "http://localhost:8000")):
return urljoin(domain, path)