

def add_douban_login_from_settings(config, prefix='velruse.douban.'):
    settings = config.registry.settings
    p = ProviderSettings(settings, prefix)
    p.update('consumer_key', required=True)
    p.update('consumer_secret', required=True)
    p.update('scope')
    p.update('login_path')
    p.update('callback_path')
    config.add_douban_login(**p.kwargs)

dataset/ETHPy150Open bbangert/velruse/velruse/providers/douban.py add_douban_login_from_settings/original