(username)
Strips the @domain.commcarehq.org from the username if it's there
Strips the
Strips the
def raw_username(username):
    """
    Strips the @domain.commcarehq.org from the username if it's there
    """
    sitewide_domain = settings.HQ_ACCOUNT_ROOT
    username = str(username or '')
    username = username.lower()
    try:
        u, d = username.split("@")
    except Exception:
        return username
    if d.endswith('.' + sitewide_domain):
        return u
    else:
        return username
def raw_username ( username ) : sitewide_domain = settings . HQ_ACCOUNT_ROOT username = str ( username or '' ) username = username . lower ( ) try : u , d = username . split ( "@" ) except Exception : return username if d . endswith ( '.' + sitewide_domain ) : return u else : return username