[Checkins] SVN: grok/branches/regebro-guido-templates/src/grok/components.py Improved the push-story.

Lennart Regebro regebro at gmail.com
Thu Oct 4 09:24:44 EDT 2007


Log message for revision 80606:
  Improved the push-story.
  

Changed:
  U   grok/branches/regebro-guido-templates/src/grok/components.py

-=-
Modified: grok/branches/regebro-guido-templates/src/grok/components.py
===================================================================
--- grok/branches/regebro-guido-templates/src/grok/components.py	2007-10-04 12:50:12 UTC (rev 80605)
+++ grok/branches/regebro-guido-templates/src/grok/components.py	2007-10-04 13:24:43 UTC (rev 80606)
@@ -122,8 +122,20 @@
         return mapply(self.render, (), self.request)
 
     def _render_template(self):
-        return self.template._render_template(self)
+        return self.template.render_template(self)
 
+    def getDefaultVariables(self):
+        namespace = {}
+        namespace['request'] = self.request
+        namespace['view'] = self
+        namespace['context'] = self.context
+        # XXX need to check whether we really want to put None here if missing
+        namespace['static'] = self.static
+        return namespace
+
+    def getTemplateVariables(self):
+        return {}
+
     def __getitem__(self, key):
         if getattr(self.template, 'macros', None) is None:
             raise AttributeError("View has no item %s" % key)



More information about the Checkins mailing list