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


Python GlobalUtilities.moneyAmount方法代码示例

本文整理汇总了Python中GlobalUtilities.moneyAmount方法的典型用法代码示例。如果您正苦于以下问题:Python GlobalUtilities.moneyAmount方法的具体用法?Python GlobalUtilities.moneyAmount怎么用?Python GlobalUtilities.moneyAmount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GlobalUtilities的用法示例。


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

示例1: semi_get_individual_donations

# 需要导入模块: import GlobalUtilities [as 别名]
# 或者: from GlobalUtilities import moneyAmount [as 别名]
    def semi_get_individual_donations(self, req):
        isAdmin, s = tools.checkAuthentication(self, False, from_endpoints=True)
        query = "individual_key:" + str(req.individual_key)

        results = s.search.donation(query, query_cursor=req.query_cursor)
        logging.info("Getting individual donations with query: " + query)

        donations = []
        new_cursor = tools.getWebsafeCursor(results[1])

        for d in results[0]:
            f = d.fields

            team_name = f[6].value
            if team_name == None:
                team_name = ""

            donation = Donation_Data(key=f[0].value, formatted_donation_date=f[9].value, name=f[2].value,
                                     email=tools.truncateEmail(f[3].value),
                                     payment_type=f[5].value, amount_donated=tools.moneyAmount(f[4].value),
                                     team_name=team_name)

            donations.append(donation)

        return Donations_Out(objects=donations, new_cursor=new_cursor)
开发者ID:rhefner1,项目名称:ghidonations,代码行数:27,代码来源:ghiendpoints.py

示例2: get_team_donation_total

# 需要导入模块: import GlobalUtilities [as 别名]
# 或者: from GlobalUtilities import moneyAmount [as 别名]
    def get_team_donation_total(self, req):
        isAdmin, s = tools.checkAuthentication(self, True, from_endpoints=True)

        t = tools.getKey(req.team_key).get()
        donation_total = tools.moneyAmount(t.data.donation_total)

        return GetTeamDonationTotal_Out(donation_total=donation_total)
开发者ID:rhefner1,项目名称:ghidonations,代码行数:9,代码来源:ghiendpoints.py

示例3: get_team_totals

# 需要导入模块: import GlobalUtilities [as 别名]
# 或者: from GlobalUtilities import moneyAmount [as 别名]
    def get_team_totals(self, req):
        s = tools.getSettingsKey(self, endpoints=True).get()

        i = tools.getKey(req.individual_key).get()

        team_totals = []
        for tl in i.teamlist_entities:
            total = GetTeamTotals_Data(team_name=tl.team_name, donation_total=tools.moneyAmount(tl.data.donation_total))
            team_totals.append(total)

        return GetTeamTotals_Out(team_totals=team_totals)
开发者ID:rhefner1,项目名称:ghidonations,代码行数:13,代码来源:ghiendpoints.py

示例4: get_team_members

# 需要导入模块: import GlobalUtilities [as 别名]
# 或者: from GlobalUtilities import moneyAmount [as 别名]
    def get_team_members(self, req):
        isAdmin, s = tools.checkAuthentication(self, True, from_endpoints=True)
        query = "team_key:" + str(req.team_key)

        results = s.search.individual(query, query_cursor=req.query_cursor)
        logging.info("Getting team members with query: " + query)

        individuals = []
        new_cursor = tools.getWebsafeCursor(results[1])

        for i in results[0]:
            f = i.fields

            individual = Individual_Data(key=f[0].value, name=f[1].value, email=f[2].value,
                                         raised=tools.moneyAmount(f[4].value))
            individuals.append(individual)

        return Individuals_Out(objects=individuals, new_cursor=new_cursor)
开发者ID:rhefner1,项目名称:ghidonations,代码行数:20,代码来源:ghiendpoints.py

示例5: get_teams

# 需要导入模块: import GlobalUtilities [as 别名]
# 或者: from GlobalUtilities import moneyAmount [as 别名]
    def get_teams(self, req):
        isAdmin, s = tools.checkAuthentication(self, True, from_endpoints=True)

        if req.query == None:
            req.query = ""

        results = s.search.team(req.query, query_cursor=req.query_cursor)
        logging.info("Getting teams with query: " + req.query)

        teams = []
        new_cursor = tools.getWebsafeCursor(results[1])

        for t in results[0]:
            f = t.fields

            team = Team_Data(key=f[0].value, name=f[1].value, donation_total=tools.moneyAmount(f[2].value))
            teams.append(team)

        return Teams_Out(objects=teams, new_cursor=new_cursor)
开发者ID:rhefner1,项目名称:ghidonations,代码行数:21,代码来源:ghiendpoints.py


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