Beispiel #1
0
def get_domain_context(domain_type='commcare'):
    """
    Set context variables that are normally set based on the domain type
    according to what user/domain type is being registered.
    """
    from corehq.apps.domain.utils import get_dummy_domain
    dummy_domain = get_dummy_domain(domain_type)
    return get_per_domain_context(dummy_domain)
Beispiel #2
0
def get_domain_context(domain_type='commcare'):
    """
    Set context variables that are normally set based on the domain type
    according to what user/domain type is being registered.
    """
    from corehq.apps.domain.utils import get_dummy_domain
    dummy_domain = get_dummy_domain(domain_type)
    return get_per_domain_context(dummy_domain)
Beispiel #3
0
def login(req, domain_type='commcare'):
    # this view, and the one below, is overridden because
    # we need to set the base template to use somewhere
    # somewhere that the login page can access it.
    domain = req.REQUEST.get('domain', None)

    from corehq.apps.domain.utils import get_dummy_domain
    # For showing different logos based on CommTrack, CommConnect, CommCare...
    dummy_domain = get_dummy_domain(domain_type)
    req.project = dummy_domain

    return _login(req, domain, "login_and_password/login.html")
Beispiel #4
0
def login(req, domain_type='commcare'):
    # this view, and the one below, is overridden because
    # we need to set the base template to use somewhere
    # somewhere that the login page can access it.
    domain = req.REQUEST.get('domain', None)

    from corehq.apps.domain.utils import get_dummy_domain
    # For showing different logos based on CommTrack, CommConnect, CommCare...
    dummy_domain = get_dummy_domain(domain_type)
    req.project = dummy_domain

    return _login(req, domain, "login_and_password/login.html")