Logo Search packages:      
Sourcecode: zope-atextensions version File versions  Download package

def ATExtensions::field::record::RecordField::getViewFor (   self,
  joinWith = ' 

formatted value of the subfield for display

Definition at line 138 of file record.py.

00138                                                            :
        formatted value of the subfield for display
        raw = self.getRaw(instance).get(subfield,'')
        if type(raw) in (type(()), type([])):
            raw = joinWith.join(raw)
        # Prevent XSS attacks by quoting all user input
        raw = html_quote(str(raw))
        # this is now very specific
        if subfield == 'email':
            return self.hideEmail(raw,instance)
        if subfield == 'phone':
            return self.labelPhone(raw)
        if subfield == 'fax':
            return self.labelFax(raw)
        if subfield == 'homepage':
            return '<a href="%s">%s</a>' % (raw, raw)
        return raw

    def getSubfieldViews(self,instance,joinWith=', '):

Generated by  Doxygen 1.6.0   Back to index