@intercept_errors(UserAPIInternalError, ignore_errors=[UserAPIRequestError])
def get_user_preference(requesting_user, preference_key, username=None):
 existing_user = _get_authorized_user(requesting_user, username, allow_staff=True)
 return UserPreference.get_value(existing_user, preference_key)

@ intercept_errors ( UserAPIInternalError , ignore_errors = [ UserAPIRequestError ] ) def get_user_preference ( requesting_user , preference_key , username = None ) : existing_user = _get_authorized_user ( requesting_user , username , allow_staff = True ) return UserPreference . get_value ( existing_user , preference_key )
returns the value of the user preference with the specified key .