本文整理汇总了Python中parse_rest.datatypes.Object.otherField方法的典型用法代码示例。如果您正苦于以下问题:Python Object.otherField方法的具体用法?Python Object.otherField怎么用?Python Object.otherField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parse_rest.datatypes.Object
的用法示例。
在下文中一共展示了Object.otherField方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: printExplain
# 需要导入模块: from parse_rest.datatypes import Object [as 别名]
# 或者: from parse_rest.datatypes.Object import otherField [as 别名]
printExplain("The objectId is the primary-key of the objects. Is the way to identify this object")
print "The objectId is: ", anyObject.objectId
printSubTitle("createdAt")
printExplain("The createdAt is the date (UTC) when this object was created")
print "The object was created on: ", anyObject.createdAt
printSubTitle("updatedAt")
printExplain("The updatedAt is the last date (UTC) the object was modified")
print "The object last update on: ", anyObject.updatedAt
print "When the object is created, both dates are the same"
printExplain('You can add new fields anytime')
anyObject.otherField = True
anyObject.score = 200
saveToParse(anyObject)
print "The object last update on: ", anyObject.updatedAt
printExplain("In the parse.com Data Browser, you see that is created a table called 'Object'")
print "To have a better name, you need to subclass"
printExplain("If you run this several times, the object will be duplicated")
print """
In contrast with Sql databases, you need to code the constrains/validations yourself"
And check if a object will duplicate or not the data before to save. Parse.com not
have built-in functionality to constrain the data to avoid duplicated objects or anything
related at all. Only provide the storage, and the default fields