[Checkins] SVN: five.pt/trunk/src/five/pt/patches.py PEP8.
Malthe Borch
mborch at gmail.com
Thu Sep 23 03:18:08 EDT 2010
Log message for revision 116742:
PEP8.
Changed:
U five.pt/trunk/src/five/pt/patches.py
-=-
Modified: five.pt/trunk/src/five/pt/patches.py
===================================================================
--- five.pt/trunk/src/five/pt/patches.py 2010-09-23 06:59:48 UTC (rev 116741)
+++ five.pt/trunk/src/five/pt/patches.py 2010-09-23 07:18:08 UTC (rev 116742)
@@ -57,6 +57,7 @@
_marker = object()
+
def get_bound_template(self, instance, type):
if instance is None:
return self
@@ -67,6 +68,7 @@
return BoundPageTemplate(template, instance)
+
def call_template(self, *args, **kw):
template = getattr(self, '_v_template', _marker)
if template is _marker or self._text != template.body:
@@ -74,6 +76,7 @@
return template(self, *args, **kw)
+
def call_template_and_wrap(self, *args, **kw):
template = getattr(self, '_v_template', _marker)
if template is _marker or self._text != template.body:
@@ -86,6 +89,7 @@
return template(self, *args, **kw)
+
def call_template_file(self, *args, **kw):
template = getattr(self, '_v_template', _marker)
if template is _marker:
@@ -98,6 +102,7 @@
return template(self, *args, **kw)
+
def get_macros(self):
template = getattr(self, '_v_template', _marker)
if template is _marker:
@@ -124,9 +129,10 @@
def pt_getContext(self, instance, request, **kw):
return {}
-
+
def _pt_get_context(self, instance, request, kwargs={}):
- namespace = super(GrokViewAwarePageTemplateFile, self)._pt_get_context(
+ namespace = super(
+ GrokViewAwarePageTemplateFile, self)._pt_get_context(
instance, request, kwargs)
if hasattr(self, 'pt_grokContext'):
namespace.update(self.pt_grokContext)
@@ -135,15 +141,16 @@
def pt_render(self, namespace):
self.pt_grokContext = namespace
# namespace contains self.pt_getContext() result + \
- # five.grok.components.ZopeTwoPageTemplate.getNamespace(view) result
- # we have currently context, request, static, and view in the dict
+ # five.grok.components.ZopeTwoPageTemplate.getNamespace(view)
+ # result we have currently context, request, static, and
+ # view in the dict
view = namespace["view"]
return self.__call__(_ob=view)
- # z3c.pt.pagetemplate.ViewPageTemplate.__call__ will call self._pt_get_context(ob, None, None)
+ # z3c.pt.pagetemplate.ViewPageTemplate.__call__ will call
+ # self._pt_get_context(ob, None, None)
def setFromFilename(self, filename, _prefix=None):
self._template = GrokViewAwarePageTemplateFile(filename, _prefix)
ZopeTwoPageTemplate.setFromFilename = setFromFilename
except ImportError:
pass
-
More information about the checkins
mailing list