Python Dynamically Add Attribute Javascript For Loop