[Checkins] SVN: grok/trunk/doc/groktut/the_rules_of_persistence3/ More example code.

Martijn Faassen faassen at infrae.com
Mon Mar 19 18:41:23 EDT 2007


Log message for revision 73363:
  More example code.
  

Changed:
  A   grok/trunk/doc/groktut/the_rules_of_persistence3/
  U   grok/trunk/doc/groktut/the_rules_of_persistence3/src/sample/app.py

-=-
Copied: grok/trunk/doc/groktut/the_rules_of_persistence3 (from rev 73362, grok/trunk/doc/groktut/the_rules_of_persistence2)

Modified: grok/trunk/doc/groktut/the_rules_of_persistence3/src/sample/app.py
===================================================================
--- grok/trunk/doc/groktut/the_rules_of_persistence2/src/sample/app.py	2007-03-19 22:36:13 UTC (rev 73362)
+++ grok/trunk/doc/groktut/the_rules_of_persistence3/src/sample/app.py	2007-03-19 22:41:22 UTC (rev 73363)
@@ -4,7 +4,11 @@
     def __init__(self):
         super(Sample, self).__init__()
         self.list = []
-    
+
+    def addText(self, text):
+        self.list.append(text)
+        self._p_changed = True
+        
 class Index(grok.View):
     pass
 
@@ -12,6 +16,5 @@
     def update(self, text=None):
         if text is None:
             return
-        self.context.list.append(text)
-        self.context._p_changed = True
+        self.context.addText(text)
         self.redirect(self.url('index'))



More information about the Checkins mailing list