def get_site_from_settings():
    sites = _get_sites_config()

    try:
        current_site_id = getattr(settings, "SITE_ID")
    except AttributeError:
        raise exceptions.SitesNotConfigured()

    if current_site_id not in sites:
        raise exceptions.SitesNotConfigured()

    return Site(sites[current_site_id])
Authenticate test-user admin via HTTP with a form post.
dataset/ETHPy150Open niwinz/django-sites/django_sites/base.py/get_site_from_settings--crossover with--dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/test/admin_auth_test.py/AdminAuthTestCase.testHTTPAdminAuthenticate