I've a table with fields Field('F1', label='name') Field('F2', label='data') .... Field('F20', label='xxx')
I wish use crud to display 5 random rows of the table, and only display F1, F2. So, here is my code: ids = [x.values()[0] for x in db().select(db.phmap.id).as_list()] idr = random.sample(ids, 5) words = db(db.phmap.id.belongs(idr)).select(db.phmap.ALL) I want to display the words with only F1 and F2 fields. How could I display them by crud.select()? I want to be smarter to use the already defined labels in db.py, but I don't know how to do it.