A teenager on Thursday attacked teachers and pupils with a knife in Jerez de la Frontera, in southern Spain, news agency Efe reported, citing local police.