def createenv(self, inputvar):
    c = inputvar['appindex']
    for k in inputvar.keys():
        self.fields[k] = forms.CharField(label=inputvar[k])
    self.fields['nameoftheapp'] = forms.CharField(label='name of the app')
    self.fields['appindex'] = forms.CharField(widget=forms.HiddenInput(), label='appindex', initial=c)
    self.fields['pvc'] = forms.BooleanField(label='PVC', required=False, initial=False)
    self.fields['space'] = forms.IntegerField(label='PVC Space', initial=1, min_value=1, max_value=10)
def createenv(self, inputvar):
    c = inputvar['appindex']
    for k in inputvar.keys():
        self.fields[k] = forms.CharField(label=inputvar[k])
    self.fields['nameoftheapp'] = forms.CharField(label='name of the app')
    self.fields['appindex'] = forms.CharField(widget=forms.HiddenInput(), label='appindex', initial=c)
    self.fields['pvc'] = forms.BooleanField(label='PVC', required=False, initial=False)
    self.fields['space'] = forms.IntegerField(label='PVC Space', initial=1, min_value=1, max_value=10)