

def profile_url_for(entity, _external=False):
    'Get an entity profile url without using url_for'
    base_url = ('http://{server}' if profile_url else '')
    profile_url = ({
        'multiple': (base_url + '/{user}'),
        'single': base_url,
        'subdomain': 'http://{user}.{server}',
    }[current_app.user_mode] + '/profile')
    server = current_app.config.get('SERVER_NAME')
    return profile_url.format(server=server, user=entity.name)

dataset/ETHPy150Open pytent/pytentd/tentd/tests/__init__.py profile_url_for/VarMisuse@21/49 `_external`->`profile_url`