本文整理汇总了Python中c3smembership.data.model.base.c3smember.C3sMember.afms_ready_for_approval方法的典型用法代码示例。如果您正苦于以下问题:Python C3sMember.afms_ready_for_approval方法的具体用法?Python C3sMember.afms_ready_for_approval怎么用?Python C3sMember.afms_ready_for_approval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c3smembership.data.model.base.c3smember.C3sMember
的用法示例。
在下文中一共展示了C3sMember.afms_ready_for_approval方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: afms_awaiting_approval
# 需要导入模块: from c3smembership.data.model.base.c3smember import C3sMember [as 别名]
# 或者: from c3smembership.data.model.base.c3smember.C3sMember import afms_ready_for_approval [as 别名]
def afms_awaiting_approval(request):
"""
List the applications for membership to be approved by the board.
=== ======================================
URL http://app:port/afms_awaiting_approval
=== ======================================
Returns:
Multiline string for copy and paste (using Pyramids string_renderer).
"""
# pylint: disable=unused-argument
afms = C3sMember.afms_ready_for_approval()
# print("there are {} afms ready for approval".format(len(afms)))
output_string = u"""\n"""
# output_string = u"""there are {} afms ready for approval \n""".format(
# len(afms))
if len(afms) > 0:
output_string += u"""Neue Genossenschaftsmitglieder\n"""
output_string += u"""------------------------------\n\n"""
output_string += u"""Vorname | Name | Anteile | Typ \n"""
output_string += u"""----------- | ---------- | ------- | ----- \n"""
for afm in afms:
output_string += u"""{} | {} | {} | {} \n""".format(
unicode(afm.firstname),
unicode(afm.lastname),
afm.num_shares,
'legal entity/inv.' if afm.is_legalentity else afm.membership_type
)
# we can not see aufstockers as of now, or?
output_string += u"""\nAufstocker\n"""
output_string += u"""------------------------------\n\n"""
output_string += u"""Vorname | Name | Anteile | Typ \n"""
output_string += u"""----------- | ---------- | ------- | ----- \n"""
output_string += u"""\n TODO: check! \n"""
return output_string