Ejemplo n.º 1
0
def format_urn(urn, org):
    if org and org.is_anon:
        return ContactURN.ANON_MASK_HTML

    if isinstance(urn, ContactURN):
        return urn.get_display(org=org, international=True)
    else:
        return URN.format(urn, international=True)
Ejemplo n.º 2
0
 def get_recipient(self, obj):
     org = self.derive_org()
     return ContactURN.ANON_MASK_HTML if org.is_anon else URN.format(
         obj.recipient, international=True)
Ejemplo n.º 3
0
 def get_sender(self, obj):
     return URN.format(obj.sender,
                       international=True) if obj.sender else "--"