parameters: (code, data)
docstring: Attach account data (fb, gm etc)
      @param code: Unique phone code
      @type code: str
      @param data: Dictionary data for the phone, passed from client in the 'data' request field
      @type data: dict
docstring_summary: Attach account data (fb, gm etc)
docstring_tokens: Attach account data ( fb gm etc )
function: def attach_account(code, data):
      """
      Attach account data (fb, gm etc)
      @param code: Unique phone code
      @type code: str
      @param data: Dictionary data for the phone, passed from client in the 'data' request field
      @type data: dict
      """
      if 'code' in data:
          del data['code']
      command = data.get('type')
      if 'type' in data:
          del data['type']
      collection = settings.MONGO['extra_data']
      data['type'] = 'account'
      data['name'] = command
      collection.insert({'code': code, 'type': 'userdata', 'data': data})
function_tokens: def attach_account ( code , data ) : if 'code' in data : del data [ 'code' ] command = data . get ( 'type' ) if 'type' in data : del data [ 'type' ] collection = settings . MONGO [ 'extra_data' ] data [ 'type' ] = 'account' data [ 'name' ] = command collection . insert ( { 'code' : code , 'type' : 'userdata' , 'data' : data } )