18 Secondly, it is necessary to teach religion to children, but not only at specified times. All their teaching should occur in an atmosphere of Christian piety. If it is otherwise, if this sacred inspiration does not penetrate the spirits of the teachers and of the students, the instruction will produce only little fruit and will often even have seriously harmful consequences. Every discipline has its own dangers and the young people will not know how to avoid them unless certain divine restraints are imposed on their intelligence and their heart. So We must beware that the essential thing, the practice of justice and piety, not be relegated to second place; that youth, restricted to those things alone which are visible, not crush the strength of virtue; that while the teachers carefully spell out the basics and the intricacies of some tiring discipline, they have no concern for the true wisdom whose "beginning is the fear of the Lord" and whose precepts should govern the whole of life. The knowledge of many subjects should always go hand in hand with the care of the spirit. Religion should give shape and direction to all branches of knowledge. Its majesty and sweetness should strike home and inspire the souls of the young.
Source: Militantis Ecclesiae (Vatican.va)