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


Python C3sMember.afms_ready_for_approval方法代码示例

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


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