[Checkins] SVN: Sandbox/cklinger/megrok.pagelet/trunk/src/megrok/pagelet/component.py the __getitem__ is not good remove it
Christian Klinger
cklinger at novareto.de
Tue Feb 3 10:15:13 EST 2009
Log message for revision 96039:
the __getitem__ is not good remove it
Changed:
U Sandbox/cklinger/megrok.pagelet/trunk/src/megrok/pagelet/component.py
-=-
Modified: Sandbox/cklinger/megrok.pagelet/trunk/src/megrok/pagelet/component.py
===================================================================
--- Sandbox/cklinger/megrok.pagelet/trunk/src/megrok/pagelet/component.py 2009-02-03 14:49:31 UTC (rev 96038)
+++ Sandbox/cklinger/megrok.pagelet/trunk/src/megrok/pagelet/component.py 2009-02-03 15:15:12 UTC (rev 96039)
@@ -49,20 +49,3 @@
(self.context, self.request), ILayoutTemplate)
return layout(self)
return self.layout()
-
-
- def __getitem__(self, key):
- # This is BBB code for Zope page templates only:
- if not isinstance(self.template, PageTemplate):
- raise AttributeError("View has no item %s" % key)
-
- value = self.template._template.macros[key]
- # When this deprecation is done with, this whole __getitem__ can
- # be removed.
- warnings.warn("Calling macros directly on the view is deprecated. "
- "Please use context/@@viewname/macros/macroname\n"
- "View %r, macro %s" % (self, key),
- DeprecationWarning, 1)
- return value
-
-
More information about the Checkins
mailing list