示例#1
0
    def publishTraverse(self, request, name):
        view = queryMultiAdapter((self, request), name=name)
        if view is not None:
            if ISaveable.providedBy(view):
                self.saveable = True
            else:
                self.saveable = False

            self.wizard.updateActions()
            return view

        for publisher in subscribers((self, request), IPublisherPlugin):
            try:
                view = publisher.publishTraverse(request, name)
                if ISaveable.providedBy(view):
                    self.saveable = True
                else:
                    self.saveable = False

                self.wizard.updateActions()
                return view
            except NotFound:
                pass

        raise NotFound(self, name, request)
示例#2
0
 def isSaveable(self):
     if self.saveable is None:
         return ISaveable.providedBy(self)
     else:
         return self.saveable