Skip to content

Commit

Permalink
Add _directly_provided export field for the object's directly provide…
Browse files Browse the repository at this point in the history
…d interfaces.
  • Loading branch information
thet committed Feb 18, 2015
1 parent b8c6451 commit 1fb2b9b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog
0.3 (unreleased)
----------------

- Add ``_directly_provided`` export field for the object's directly provided
interfaces.
[thet]

- Add more schemaextender Archetype field types from some addons.
[thet]

Expand Down
9 changes: 9 additions & 0 deletions collective/jsonify/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ def get_properties(self):
(pid, val, self.context.getPropertyType(pid))
)

def get_directly_provided_interfaces(self):
try:
from zope.interface import directlyProvidedBy
except:
return
self['_directly_provided'] = [
it.__identifier__ for it in directlyProvidedBy(self.context)
]

def get_defaultview(self):
""" Default view of object
:keys: _layout, _defaultpage
Expand Down

0 comments on commit 1fb2b9b

Please sign in to comment.