linji

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

  •  
  •   linji · Feb 10, 2011 · 2283 views
    This topic created in 5623 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   ·   2881 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 05:04 · PVG 13:04 · LAX 22:04 · JFK 01:04
    ♥ Do have faith in what you're doing.