山本さん
ご報告ありがとうございます。modelform で monkey patch を当てている StringListProperty は
改行で分かつような挙動をしてしまうのが原因だと思います。
下記のようなクラスを作ってモデルの方で使用すれば行けそうです。
(form のコードは一緒で、model のプロパティだけ変更)
ちょっとお試しください。
from google.appengine.ext import db
class StringListPropertyPassThrough(db.StringListProperty):
def get_value_for_form(self, instance):
"""Extract the property value from the instance for use in a form.
This joins a list of strings with newlines.
"""
value = db.ListProperty.get_value_for_form(self, instance)
if not value:
return None
return value
def make_value_from_form(self, value):
"""Convert a form value to a property value.
This breaks the string into lines.
"""
if not value:
return []
return value
--
Takashi Matsuo
matsuo....@gmail.com
Kay's daddy
2010/5/3 yamamoto <
x.yam...@gmail.com>: