当前位置: 首页>>代码示例>>Python>>正文


Python Object.otherField方法代码示例

本文整理汇总了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
开发者ID:jcmoriar,项目名称:WeatherGame,代码行数:33,代码来源:pyToParse.py


注:本文中的parse_rest.datatypes.Object.otherField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。