Python IMissionReport Example

Introduction

The python imissionreport example is extracted from the most popular open source projects, you can refer to the following example for usage.

Programming language: Python

Namespace/package name: ploneunmissionscontentmissionreport

Example#1
File: indexer.pyProject: glenn27/ploneun.missions

def mission_has_missionreport(obj):
    for i in obj.values():
        if IMissionReport.providedBy(i):
            if api.content.get_state(i) != 'private':
                return True
    return False

Example#2
File: indexer.pyProject: glenn27/ploneun.missions

def reindex_missionreport_on_mission_modification(obj, event):
    for i in obj.values():
        if IMissionReport.providedBy(i):
            i.reindexObject()

Example#3
File: content_in_mission_report.pyProject: glenn27/ploneun.missions

 def mission_report(self):
     parent = aq_parent(self.context)
     if IMissionReport.providedBy(parent):
         return parent
     return None