Update by natay on Mon Apr 16 09:36:38 EDT 2018 from natay
@@ -192,10 +192,9 @@ class DataEditForm(forms.ModelForm):
self.fields["file"] = forms.FileField(widget=forms.ClearableFileInput)
elif self.instance.method == Data.TEXTAREA:
- initial = ''
+ initial = '\n'.join(open(self.instance.get_files()[0], 'r').readlines())
self.fields["input_text"] = forms.CharField(max_length=1024, required=False, initial=initial)
-
return
class Meta:
