Python Dynamically Add Attribute Using Javascript