コード例 #1
0
ファイル: audit.py プロジェクト: BenoitTalbot/bungeni-portal
 def objectModified(self, object, event):
     attrset = []
     for attr in event.descriptions:
         if lifecycleevent.IAttributes.providedBy(attr):
             attrset.extend(
                 [ attr.interface[a].title for a in attr.attributes]
                )
         elif IRelationChange.providedBy(attr):
             if attr.description:
                 attrset.append(attr.description)
     attrset.append(getattr(object, "note", u""))
     str_attrset = []
     for a in attrset:
         if type(a) in StringTypes:
             str_attrset.append(a)
     description = u", ".join(str_attrset)
     change_data = self._get_change_data()
     if change_data["note"]:
         extras = {"comment": change_data["note"]}
     else:
         extras = None
     return self._objectChanged("modified", object, 
                     description=description,
                     notes=extras,
                     date_active=change_data["date_active"])
コード例 #2
0
 def objectModified(self, object, event):
     attrset = []
     for attr in event.descriptions:
         if lifecycleevent.IAttributes.providedBy(attr):
             attrset.extend(
                 [attr.interface[a].title for a in attr.attributes])
         elif IRelationChange.providedBy(attr):
             if attr.description:
                 attrset.append(attr.description)
     attrset.append(getattr(object, "note", u""))
     str_attrset = []
     for a in attrset:
         if type(a) in StringTypes:
             str_attrset.append(a)
     description = u", ".join(str_attrset)
     change_data = self._get_change_data()
     if change_data["note"]:
         extras = {"comment": change_data["note"]}
     else:
         extras = None
     return self._objectChanged("modified",
                                object,
                                description=description,
                                notes=extras,
                                date_active=change_data["date_active"])
コード例 #3
0
    def objectModified( self, event ):
        attrset =[]
        for attr in event.descriptions:
            if lifecycleevent.IAttributes.providedBy( attr ):
                attrset.extend(
                    [ attr.interface[a].title for a in attr.attributes]
                    )
            elif IRelationChange.providedBy(attr):
                attrset.append( attr.description )

        description = u", ".join( attrset )
        return self._objectChanged(u'modified', description )
コード例 #4
0
ファイル: audit.py プロジェクト: mohalfaki/bungeni-portal
 def objectModified(self, object, event):
     attrset = []
     for attr in event.descriptions:
         if lifecycleevent.IAttributes.providedBy(attr):
             attrset.extend(
                 [attr.interface[a].title for a in attr.attributes])
         elif IRelationChange.providedBy(attr):
             if attr.description:
                 attrset.append(attr.description)
     attrset.append(getattr(object, 'note', u""))
     str_attrset = []
     for a in attrset:
         if type(a) in StringTypes:
             str_attrset.append(a)
     description = u", ".join(str_attrset)
     return self._objectChanged(u'modified', object, description)
コード例 #5
0
ファイル: audit.py プロジェクト: BenoitTalbot/bungeni-portal
 def objectModified( self, object, event ):
     attrset =[]
     for attr in event.descriptions:
         if lifecycleevent.IAttributes.providedBy( attr ):
             attrset.extend(
                 [ attr.interface[a].title for a in attr.attributes]
                 )
         elif IRelationChange.providedBy(attr):
             if attr.description:
                 attrset.append( attr.description )
     attrset.append(getattr(object, 'note', u""))
     str_attrset = []
     for a in attrset:
         if type(a) in StringTypes:
             str_attrset.append(a)
     description = u", ".join( str_attrset )
     return self._objectChanged(u'modified', object, description )