V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
linji

同时报告本站使用的一个问题

  •  
  •   linji · Feb 10, 2011 · 2174 views
    This topic created in 5559 days ago, the information mentioned may be changed or developed.
    在首页,在使用向世界提问时,出现如下错误,无法提交。
    Traceback (most recent call last):
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 517, in __call__
    handler.post(*groups)
    File "/base/data/home/apps/v2ex/1.348237887594687648/topic.py", line 264, in post
    topic.title = topic_title
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 541, in __set__
    value = self.validate(value)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 2435, in validate
    raise BadValueError('Property %s is not multi-line' % self.name)
    BadValueError: Property title is not multi-line
    2 replies    1970-01-01 08:00:00 +08:00
    manhere
        1
    manhere  
       Feb 10, 2011
    刚才也遇到过一次
    darasion
        2
    darasion  
       Feb 10, 2011
    嗯,这是提问标题里边有换行引起的。
    db.StringProperty() 默认不能换行。
    加上multiline=True就行了:

    db.StringProperty(multiline=True)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2531 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 06:06 · PVG 14:06 · LAX 23:06 · JFK 02:06
    ♥ Do have faith in what you're doing.