def load_service(service_name, from_url): from ..providers import load_provider provider = load_provider() return load_target(SHARING_SERVICES_SETTINGS_KEY, service_name)(service_name, from_url, provider)
def load_provider(provider_name=None, settings=django_settings): if provider_name is None: provider_name = getattr(settings, SHARING_PREFERRED_PROVIDER_KEY) return load_target(SHARING_PROVIDERS_SETTINGS_KEY, provider_name)(provider_name)