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


Python compat.unicode_to_repr函数代码示例

本文整理汇总了Python中rest_framework.compat.unicode_to_repr函数的典型用法代码示例。如果您正苦于以下问题:Python unicode_to_repr函数的具体用法?Python unicode_to_repr怎么用?Python unicode_to_repr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了unicode_to_repr函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __repr__

 def __repr__(self):
     """
     Fields are represented using their initial calling arguments.
     This allows us to create descriptive representations for serializer
     instances that show all the declared fields on the serializer.
     """
     return unicode_to_repr(representation.field_repr(self))
开发者ID:32footsteps,项目名称:SpecialCollectionsProject,代码行数:7,代码来源:fields.py

示例2: __repr__

 def __repr__(self):
     return unicode_to_repr('<%s(queryset=%s, field=%s, date_field=%s)>' % (
         self.__class__.__name__,
         smart_repr(self.queryset),
         smart_repr(self.field),
         smart_repr(self.date_field)
     ))
开发者ID:10clouds,项目名称:django-rest-framework,代码行数:7,代码来源:validators.py

示例3: __repr__

 def __repr__(self):
     return unicode_to_repr('<%s value=%s errors=%s>' % (
         self.__class__.__name__, self.value, self.errors
     ))
开发者ID:BWStearns,项目名称:django-rest-framework,代码行数:4,代码来源:serializer_helpers.py

示例4: __repr__

 def __repr__(self):
     return unicode_to_repr(representation.list_repr(self, indent=1))
开发者ID:epicserve,项目名称:django-rest-framework,代码行数:2,代码来源:serializers.py

示例5: __repr__

 def __repr__(self):
     return unicode_to_repr('ErrorDetail(string=%r, code=%r)' % (
         six.text_type(self),
         self.code,
     ))
开发者ID:jaidharosenblatt,项目名称:TutorEDU,代码行数:5,代码来源:exceptions.py


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