克服python中的appengine 500字节字符串限制?考虑文字 [英] Overcome appengine 500 byte string limit in python? consider text
本文介绍了克服python中的appengine 500字节字符串限制?考虑文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我明白了:
BadValueError: Property is 804 bytes long; it must be 500 or less. Consider Text instead, which can store strings of any length.
我读了这篇文章: http://blog.zmxv.com/2012/02/appengine-go-sdks-500-byte-string.html 和以下内容:
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!:)
如果我将用户输入限制为500个字符,那将解决所有问题吗?谢谢.
If I limit user input to 500 chars, will that solve everything? Thanks..
推荐答案
,因此请考虑TextProperty
.
切换.
yourproperty = db.StringProperty()
到
yourproperty = db.TextProperty()
,您会没事的.请记住,TextProperty
未未编入索引.
and you will be fine. keep in mind that TextProperty
is not indexed.
这篇关于克服python中的appengine 500字节字符串限制?考虑文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文