[Checkins] SVN: grok/trunk/doc/minitutorials/ Remove "newbie" from
links. Add reference to template-languages
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Thu Nov 8 15:04:23 EST 2007
Log message for revision 81617:
Remove "newbie" from links. Add reference to template-languages
tutorial.
Changed:
U grok/trunk/doc/minitutorials/index.txt
U grok/trunk/doc/minitutorials/template-languages.txt
-=-
Modified: grok/trunk/doc/minitutorials/index.txt
===================================================================
--- grok/trunk/doc/minitutorials/index.txt 2007-11-08 20:02:07 UTC (rev 81616)
+++ grok/trunk/doc/minitutorials/index.txt 2007-11-08 20:04:22 UTC (rev 81617)
@@ -8,7 +8,7 @@
These mini-tutorials have been contributed by members of the Grok community.
-* `Newbie Permissions Tutorial </minitutorials/permissions.html>`_:
+* `Permissions Tutorial </minitutorials/permissions.html>`_:
Zope3 and Grok come with authorization capabilities out of the box. While a
vanilla Zope3 application protects all content by default and performs
@@ -18,7 +18,7 @@
Author: Luis De la Parra; Uli Fouquet; Jan-Wijbrand Kolman
-* `Newbie Search Tutorial </minitutorials/searching.html>`_:
+* `Search Tutorial </minitutorials/searching.html>`_:
Grok supports the vanilla indexing services available in Zope 3
straight out of the box. The catalog uses developer-defined indexes
@@ -62,6 +62,18 @@
Author: Martijn Faassen
+* `Pluggable template laguanges </minitutorials/template-languages.html>`_:
+
+ Grok, like the Zope 3 framework on which it is built, uses Zope Page
+ Templates as its default templating language. While you can, of course, use
+ whatever templating language you want in Grok by calling it manually, you can
+ also ?plug in? a template language such that both inline templates and
+ templates stored in files are automatically linked with your Views ? just
+ like inline ``grok.PageTemplates`` and files with the ``.pt`` extension are
+ by default.
+
+ Author: Lennart Regebro
+
Buildout
========
Modified: grok/trunk/doc/minitutorials/template-languages.txt
===================================================================
--- grok/trunk/doc/minitutorials/template-languages.txt 2007-11-08 20:02:07 UTC (rev 81616)
+++ grok/trunk/doc/minitutorials/template-languages.txt 2007-11-08 20:04:22 UTC (rev 81617)
@@ -47,7 +47,7 @@
self._template = MyTemplate(file.read())
def render(self, view):
- return self._template.render(**self.getNamespace(view))
+ return self._template.render(\**self.getNamespace(view))
With this class finished you can create an inline template, like this:
@@ -55,7 +55,7 @@
class AView(grok.View):
pass
-
+
aview = MyPageTemplate('<html><body>Some text</body></html>')
And also you can create a filebase template, inline:
@@ -64,7 +64,7 @@
class AView(grok.View):
pass
-
+
aview = MyTemplateFile('lasceuax.html')
More information about the Checkins
mailing list