Changeset 5048 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 11 Mar 2010, 13:21:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py
r4987 r5048 4 4 from hurry import yui 5 5 from megrok.layout import Page, Layout, EditForm, DisplayForm, AddForm 6 from waeup.sirp.interfaces import IWAeUPObject 7 from z3c.flashmessage.interfaces import IMessageSource 8 from zope.component import queryUtility, ComponentLookupError 6 from z3c.flashmessage.interfaces import IMessageSource, IMessageReceiver 7 from zope.component import getUtility, queryUtility, ComponentLookupError 9 8 from zope.interface import Interface 10 # Conditional import. getSite moved to zope.site.hooks in recent grok versions.11 9 try: 12 10 from zope.site.hooks import getSite 13 11 except ImportError: 12 # BBB 14 13 from zope.app.component.hooks import getSite 14 from waeup.sirp.interfaces import IWAeUPObject 15 15 16 16 grok.templatedir('templates') … … 29 29 """ 30 30 return dict() 31 32 class Messages(grok.View): 33 """Display messages of message receivers. 34 """ 35 36 grok.context(Interface) 37 38 @property 39 def messages(self): 40 receiver = getUtility(IMessageReceiver) 41 return receiver.receive() 31 42 32 43 class UtilityView(object): … … 61 72 grok.baseclass() 62 73 63 class WAeUPPage(Page , UtilityView):74 class WAeUPPage(Page): 64 75 """A megrok.layout page with additional methods. 65 76 """
Note: See TracChangeset for help on using the changeset viewer.