We propose that a chain of five-membered rings (polyaminotriazole) should be ferromagnetic with an appropriate doping that is envisaged to be feasible with a field-effect transistor structure. The ferromagnetism is confirmed by a spin density functional calculation, which also shows that ferromagnetism survives the Peierls instability. We explain the magnetism in terms of the Mielke and Tasaki flatband ferromagnetism with the Hubbard model. This opens a new possibility of band ferromagnetism in purely organic polymers.