[POS-commit] r5383 - stoqlib/trunk/stoqlib/gui/base

Johan Dahlin jdahlin at async.com.br
Mon Nov 27 14:27:28 BRST 2006


Author: jdahlin
Date: Mon Nov 27 14:27:28 2006
New Revision: 5383

Modified:
   stoqlib/trunk/stoqlib/gui/base/editors.py

Log:
Improve create_model documentation


Modified: stoqlib/trunk/stoqlib/gui/base/editors.py
==============================================================================
--- stoqlib/trunk/stoqlib/gui/base/editors.py	(original)
+++ stoqlib/trunk/stoqlib/gui/base/editors.py	Mon Nov 27 14:27:28 2006
@@ -99,12 +99,13 @@
             widget.set_sensitive(False)
         self.update_visual_mode()
 
-    def create_model(self, conn):
+    def create_model(self, trans):
         """
-        It is expected to return a new model, which will be used if a model
-        wasn't sent to the object at instantiation time.
+        Creates a new model for the editor.
+        After this method is called, the model can be accessed as self.model.
         The default behavior is to raise a TypeError, which can
         be overridden in a subclass.
+        @param trans: a database transaction
         """
         raise TypeError("%r needs a model, got None. Perhaps you want to "
                         "implement create_model?" % self)


More information about the POS-commit mailing list