def make_url(self, url, base_url=None, absolute=None, external=None):
        url_style = self.db.config.url_style
        if absolute is None:
            absolute = url_style == 'absolute'
        if external is None:
            external = url_style == 'external'
        if external:
            external_base_url = self.db.config.base_url
            if external_base_url is None:
                raise RuntimeError('To use absolute URLs you need to '
                                   'configure the URL in the project config.')
            return url_join(external_base_url, url.lstrip('/'))
        if absolute:
            return url_join(self.db.config.base_path, url.lstrip('/'))
        if base_url is None:
            raise RuntimeError('Cannot calculate a relative URL if no base '
                               'URL has been provided.')
        return make_relative_url(base_url, url)
Helper method that creates a finalized URL based on the parameters
dataset/ETHPy150Open lektor/lektor/lektor/db.py/Pad.make_url