def format(self): elems = [e.strip() for e in [ self.street_address, self.postal_code, self.city, self.region, utils.country_name_from_code(self.country_code) \ if self.country_code else None ] if e is not None] return "\n".join(elems).replace(", ", "\n")
def format(self): elems = [ e.strip() for e in [ self.street_address, self.postal_code, self.city, self.region, utils.country_name_from_code(self.country_code) if self.country_code else None, ] if e is not None ] return "\n".join(elems).replace(", ", "\n")
def country(self): contact = self.primary_contact if contact is None or contact.country_code is None: return return utils.country_name_from_code(contact.country_code)
def countrycode2name(code): return utils.country_name_from_code(code)
def country(self): contact = self.primary_contact if contact and contact.country_code: return utils.country_name_from_code(contact.country_code)