[Checkins] SVN: grok/trunk/doc/ Completely python driven views
sample-ized.
Martijn Faassen
faassen at infrae.com
Fri Mar 16 17:26:12 EDT 2007
Log message for revision 73253:
Completely python driven views sample-ized.
Changed:
A grok/trunk/doc/groktut/completely_python_driven_views/
U grok/trunk/doc/groktut/completely_python_driven_views/src/sample/app.py
D grok/trunk/doc/groktut/completely_python_driven_views/src/sample/app_templates/
U grok/trunk/doc/tutorial.txt
-=-
Copied: grok/trunk/doc/groktut/completely_python_driven_views (from rev 73252, grok/trunk/doc/groktut/generating_html_from_python)
Modified: grok/trunk/doc/groktut/completely_python_driven_views/src/sample/app.py
===================================================================
--- grok/trunk/doc/groktut/generating_html_from_python/src/sample/app.py 2007-03-16 21:17:44 UTC (rev 73252)
+++ grok/trunk/doc/groktut/completely_python_driven_views/src/sample/app.py 2007-03-16 21:26:12 UTC (rev 73253)
@@ -4,6 +4,5 @@
pass
class Index(grok.View):
- def some_html(self):
- return "<b>ME GROK BOLD</b>"
-
+ def render(self):
+ return "ME GROK NO TEMPLATE"
Modified: grok/trunk/doc/tutorial.txt
===================================================================
--- grok/trunk/doc/tutorial.txt 2007-03-16 21:17:44 UTC (rev 73252)
+++ grok/trunk/doc/tutorial.txt 2007-03-16 21:26:12 UTC (rev 73253)
@@ -580,17 +580,11 @@
we are not returning a HTML page at all, for instance. In this case,
we can use the special ``render`` method on a view.
-Modify ``app.py`` so it reads like this::
+Modify ``app.py`` so it reads like this:
- import grok
+.. include:: groktut/completely_python_driven_views/src/sample/app.py
+ :literal:
- class Sample(grok.Application, grok.Container):
- pass
-
- class Index(grok.View):
- def render(self):
- return "ME GROK NO TEMPLATE"
-
If you were to start up Zope with an ``index.pt`` template still
inside ``app_templates`` you would get an error::
More information about the Checkins
mailing list