[Checkins] SVN: grok/branches/regebro-guido-templates/ Update
tutorial, and the templatefile test.
Lennart Regebro
regebro at gmail.com
Mon Nov 5 12:33:40 EST 2007
Log message for revision 81544:
Update tutorial, and the templatefile test.
Changed:
U grok/branches/regebro-guido-templates/CHANGES.txt
U grok/branches/regebro-guido-templates/doc/minitutorials/template-languages.txt
U grok/branches/regebro-guido-templates/src/grok/tests/view/templatefile.py
-=-
Modified: grok/branches/regebro-guido-templates/CHANGES.txt
===================================================================
--- grok/branches/regebro-guido-templates/CHANGES.txt 2007-11-05 17:32:33 UTC (rev 81543)
+++ grok/branches/regebro-guido-templates/CHANGES.txt 2007-11-05 17:33:40 UTC (rev 81544)
@@ -45,8 +45,11 @@
-------------
* The new pluggable template language support includes some restructuring:
+ - GrokPageTemplate is now split up into two. BaseTemplate, on which all
+ templates need to be based, and GrokTemplate, which also provides a
+ set of methods for easy integration of templating languages.
- - All objects based on GrokPageTemplate is now grokked, instead of having
+ - All objects based on GrokTemplate are now grokked, instead of having
separate grokkers for each type of template.
- The View is now completely template-language agnostic, which makes it
Modified: grok/branches/regebro-guido-templates/doc/minitutorials/template-languages.txt
===================================================================
--- grok/branches/regebro-guido-templates/doc/minitutorials/template-languages.txt 2007-11-05 17:32:33 UTC (rev 81543)
+++ grok/branches/regebro-guido-templates/doc/minitutorials/template-languages.txt 2007-11-05 17:33:40 UTC (rev 81544)
@@ -16,7 +16,7 @@
----------------
"Inline" templates are templates where the template code is written inside the
python class. To get the automatic association to a view class, you need to
-write a class that subclasses from grok.components.GrokPageTemplate. There are
+write a class that subclasses from grok.components.GrokTemplate. There are
however some methods you need to override, namely the fromFile and fromString
factory methods, and the render method.
@@ -24,7 +24,7 @@
.. code-block:: python
-class MyPageTemplate(grok.components.GrokPageTemplate):
+class MyPageTemplate(grok.components.GrokTemplate):
def fromTemplate(self, template):
return MyTemplate(template)
Modified: grok/branches/regebro-guido-templates/src/grok/tests/view/templatefile.py
===================================================================
--- grok/branches/regebro-guido-templates/src/grok/tests/view/templatefile.py 2007-11-05 17:32:33 UTC (rev 81543)
+++ grok/branches/regebro-guido-templates/src/grok/tests/view/templatefile.py 2007-11-05 17:33:40 UTC (rev 81544)
@@ -27,5 +27,5 @@
class Food(grok.View):
pass
-food = grok.PageTemplateFile(os.path.join('templatedirectoryname',
- 'food.pt'))
+food = grok.PageTemplate(filename=os.path.join('templatedirectoryname',
+ 'food.pt'))
More information about the Checkins
mailing list