def getAll(): try: users = CaliopeUser.index.search('username:*') users_list = [] for user in users: users_list.append(UsersManager.get_user_node_data(user)) return users_list except DoesNotExist as e: raise JSONRPCInvalidRequestError(e)
def getPredio(sector): try: rec = RegistroPredioCatastroTipoII.index.get(sector=sector) if rec: data = {} for k, v in rec._get_node_data().items(): if not isinstance(v, unicode): v = unicode(v) data[k] = v return {'value': data} return {'record': False} except DoesNotExist as e: raise JSONRPCInvalidRequestError(e)
def getGroups(): raise JSONRPCInvalidRequestError('Unimplemented')
def addGroup(groupname): raise JSONRPCInvalidRequestError('Unimplemented')
def addUser(username, password, group=None): raise JSONRPCInvalidRequestError('Unimplemented')
def getFilteredByGroup(proyect_id): raise JSONRPCInvalidRequestError('Unimplemented')