Clapham Terrace Community Primary School in Leamington Spa, Warwickshire, declined to say what punishment had been given to the boys aged 10.
The teacher, Emma Place, is believed to have been warned by other pupils not to drink the doctored flask.
It was reported the incident happened last Tuesday, a day after a teacher was stabbed to death at a school in Leeds.
In a statement confirming disciplinary action had been taken, Clapham Terrace's chair of governors Philip Robbins said the teacher involved did not wish to press criminal charges.
Mr Robbins said: "During the first week of the summer term, two of our older pupils added a home-made concoction, believed to be a mixture of bathroom products, to a teacher's drink on her desk in the classroom.
"The teacher was alerted to this and did not drink her drink.
"With the cooperation of their parents, the two pupils concerned were removed from their normal lessons and were disciplined by the school, in a manner consistent with the school's normal pastoral policy.
"Pupils will receive ongoing guidance and counselling within school."
Mr Robbins said Warwickshire Police were informed of the incident and liaised with the head teacher.
But he added: "Neither the teacher concerned nor the school intends to press charges."
Warwickshire Police said advice and guidance had been provided by officers to children at the school
lA man aged 42 has admitted sending abusive Twitter messages about the murder of school teacher Ann Maguire. Robert Riley, from Port Talbot, South Wales, appeared before magistrates in Leeds where he admitted sending a message of a grossly offensive, abusive or malicious character.
The bench heard some messages he sent related to the murder of Mrs Maguire, 61, at Corpus Christi Catholic College in Leeds.
Magistrates transferred the case to Swansea Magistrates' Court and Riley was freed on bail.