def __init__(self, name, value, attrs, choice, index): super(PaymentRadioInput, self).__init__(name, value, attrs, choice, index) logo_url = import_name(choice[0]).PaymentProcessor.get_logo_url() if logo_url: self.choice_label = mark_safe('<img src="%s%s" alt="%s">' % ( getattr(settings, 'STATIC_URL', ''), logo_url, force_unicode(choice[1]), ))
def __init__(self, name, value, attrs, choice, index): super(PaymentRadioInput, self).__init__(name, value, attrs, choice, index) logo_url = import_name(choice[0]).PaymentProcessor.get_logo_url() if logo_url : self.choice_label = mark_safe('<img src="%s%s" alt="%s">' % ( getattr(settings, 'STATIC_URL', ''), logo_url, force_unicode(choice[1]), ) )
def taxation_policy(self): taxation_policy = getattr(settings, 'INVOICING_TAXATION_POLICY', None) if taxation_policy is not None: return import_name(taxation_policy) # Check if supplier is from EU if self.supplier_country: if EUTaxationPolicy.is_in_EU(self.supplier_country.code): return EUTaxationPolicy return None