本文整理汇总了Python中graphene.DateTime方法的典型用法代码示例。如果您正苦于以下问题:Python graphene.DateTime方法的具体用法?Python graphene.DateTime怎么用?Python graphene.DateTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类graphene
的用法示例。
在下文中一共展示了graphene.DateTime方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: convert_field_to_datetime
# 需要导入模块: import graphene [as 别名]
# 或者: from graphene import DateTime [as 别名]
def convert_field_to_datetime(field, registry=None):
return graphene.DateTime(
description=get_field_description(field, registry), required=field.required
)
示例2: test_should_datetime_convert_datetime
# 需要导入模块: import graphene [as 别名]
# 或者: from graphene import DateTime [as 别名]
def test_should_datetime_convert_datetime():
assert_conversion(mongoengine.DateTimeField, graphene.DateTime)
示例3: convert_form_field_to_datetime
# 需要导入模块: import graphene [as 别名]
# 或者: from graphene import DateTime [as 别名]
def convert_form_field_to_datetime(field):
return DateTime(description=field.help_text, required=field.required)
示例4: resolve_create_time
# 需要导入模块: import graphene [as 别名]
# 或者: from graphene import DateTime [as 别名]
def resolve_create_time(self, info: ResolveInfo) -> graphene.DateTime():
return self.create_time
示例5: resolve_last_update_time
# 需要导入模块: import graphene [as 别名]
# 或者: from graphene import DateTime [as 别名]
def resolve_last_update_time(self, info: ResolveInfo) -> graphene.DateTime():
return self.last_update_time
示例6: resolve_start_time
# 需要导入模块: import graphene [as 别名]
# 或者: from graphene import DateTime [as 别名]
def resolve_start_time(self, info: ResolveInfo) -> graphene.DateTime():
return self.start_time
示例7: resolve_end_time
# 需要导入模块: import graphene [as 别名]
# 或者: from graphene import DateTime [as 别名]
def resolve_end_time(self, info: ResolveInfo) -> graphene.DateTime():
return self.end_time