Every officer of the city before entering upon the duties of his office shall take and subscribe to the oath and affirmation of office as provided by the state constitution and state law, and shall further swear and affirm that he will support, obey and defend the charter and ordinances of the city and will discharge the duties of that office thereafter; and that he does not belong to any party or other organization which believes in, teaches or advocates the change or destruction of any form of government by force or any other means other than that of the ballot.