def updatevariables(self, oldvars):
    for i in range(0, len(oldvars)):
        self.fields[oldvars[i].name] = forms.CharField(label=oldvars[i].name, initial=oldvars[i].value)
def updatevariables(self, oldvars):
    for i in range(0, len(oldvars)):
        self.fields[oldvars[i].name] = forms.CharField(label=oldvars[i].name, initial=oldvars[i].value)