Overcome appengine 500 byte string limit in python

2019-07-16 13:40发布

I get this:

BadValueError: Property   is 804 bytes long; it must be 500 or less. Consider Text instead, which can store strings of any length.

I read this: http://blog.zmxv.com/2012/02/appengine-go-sdks-500-byte-string.html and this: App Engine BadValueError On Bulk Data Upload - TextProperty being construed as StringProperty but I still don't understand how to solve it quickly.

It says, consider text? I'm willing to consider text!:)

If I limit user input to 500 chars, will that solve everything? Thanks..

1条回答
女痞
2楼-- · 2019-07-16 14:36

so consider the TextProperty.

switch from.

yourproperty = db.StringProperty()

to

yourproperty = db.TextProperty()

and you will be fine. keep in mind that TextProperty is not indexed.

查看更多
登录 后发表回答