私はシンプルなDjangoのフォームがあります。Djangoフォームフィールドのデータにアクセスするにはどうすればよいですか?
class testForm(forms.Form):
list = forms.CharField()
def getItems(self):
#How do I do this? Access the data stored in list.
return self.list.split(",") #This doesn't work
リスト形式のフィールドは、CSVデータ値を格納します。ビュー内のtestFormの外部インスタンスから、フォームフィールドに格納されている.csv値リストを確認できます。