No person shall be eligible for the office of mayor of the city who has not been a resident thereof for one year or more continuously preceding the election, and who is not a qualified elector to vote in the city elections of the city. Nor shall any person be eligible for the office of councilmember of the city who is not eligible for the office of mayor, and who has not resided in the district which such person seeks to represent for at least six months immediately preceding the date of election.