expephalon/core/helpers/urls.py

6 lines
200 B
Python
Raw Normal View History

2020-05-21 12:54:59 +00:00
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)