Пример #1
0
 def rows(self):
     rows = []
     for criteria in self.sms_gateway_fee_criteria:
         gateway_fee = SmsGatewayFee.get_by_criteria_obj(criteria)
         rows.append([
             criteria.backend_api_id,
             (criteria.backend_instance
              if criteria.backend_instance is not None else "Any"),
             criteria.direction,
             (criteria.country_code
              if criteria.country_code is not None else "Any"),
             "%(amount)s %(currency)s" % {
                 'amount': str(gateway_fee.amount),
                 'currency': gateway_fee.currency.code,
             },
         ])
     return rows
Пример #2
0
 def rows(self):
     rows = []
     for criteria in self.sms_gateway_fee_criteria:
         gateway_fee = SmsGatewayFee.get_by_criteria_obj(criteria)
         rows.append([
             criteria.backend_api_id,
             (criteria.backend_instance
              if criteria.backend_instance is not None else "Any"),
             criteria.direction,
             (criteria.country_code
              if criteria.country_code is not None else "Any"),
             criteria.prefix or "Any",
             "%(amount)s %(currency)s" % {
                 'amount': str(gateway_fee.amount),
                 'currency': gateway_fee.currency.code,
             },
         ])
     return rows