[Checkins] SVN: Sandbox/darrylcousins/mars. Views implementing
IGrokView - this solved some publication problems with absolute url.
Darryl Cousins
darryl at darrylcousins.net.nz
Sun Jul 29 07:54:46 EDT 2007
Log message for revision 78458:
Views implementing IGrokView - this solved some publication problems with absolute url.
Changed:
U Sandbox/darrylcousins/mars.form/src/mars/form/components.py
U Sandbox/darrylcousins/mars.view/src/mars/view/components.py
-=-
Modified: Sandbox/darrylcousins/mars.form/src/mars/form/components.py
===================================================================
--- Sandbox/darrylcousins/mars.form/src/mars/form/components.py 2007-07-29 11:53:29 UTC (rev 78457)
+++ Sandbox/darrylcousins/mars.form/src/mars/form/components.py 2007-07-29 11:54:45 UTC (rev 78458)
@@ -6,6 +6,8 @@
from z3c.formui.interfaces import IDivFormLayer as IZ3CDivFormLayer
from z3c.formui.interfaces import ITableFormLayer as IZ3CTableFormLayer
+from grok.interfaces import IGrokView
+
from mars.layer import ILayer
## layers
@@ -24,4 +26,4 @@
class FormView(object):
"""Vanilla view to mixin with z3c.form views"""
- zope.interface.implements(IPagelet)
+ zope.interface.implements(IPagelet, IGrokView)
Modified: Sandbox/darrylcousins/mars.view/src/mars/view/components.py
===================================================================
--- Sandbox/darrylcousins/mars.view/src/mars/view/components.py 2007-07-29 11:53:29 UTC (rev 78457)
+++ Sandbox/darrylcousins/mars.view/src/mars/view/components.py 2007-07-29 11:54:45 UTC (rev 78458)
@@ -18,8 +18,6 @@
_template_interface = IPageTemplate
def render(self):
- if self.request.response.getStatus() in (302, 303):
- return
template = getattr(self, 'template', None)
if template is None:
template = zope.component.getMultiAdapter(
@@ -30,6 +28,7 @@
class TemplateView(TemplateViewBase, BrowserPage):
+ zope.interface.implements(IGrokView)
def __init__(self, context, request):
super(TemplateView, self).__init__(context, request)
@@ -57,11 +56,12 @@
return layout(self)
class LayoutView(LayoutViewBase, BrowserPage):
+ zope.interface.implements(IGrokView)
__init__ = BrowserPage.__init__
class PageletView(TemplateViewBase, LayoutViewBase, BrowserPage):
- zope.interface.implements(IPagelet)
+ zope.interface.implements(IPagelet, IGrokView)
__init__ = BrowserPage.__init__
More information about the Checkins
mailing list