[Checkins] SVN: grokcore.formlib/trunk/src/grokcore/formlib/ fix getting the default value for the context directive

Jan-Wijbrand Kolman janwijbrand at gmail.com
Mon Nov 1 13:54:27 EDT 2010


Log message for revision 118077:
  fix getting the default value for the context directive

Changed:
  U   grokcore.formlib/trunk/src/grokcore/formlib/ftests/form/actions.py
  U   grokcore.formlib/trunk/src/grokcore/formlib/meta.py

-=-
Modified: grokcore.formlib/trunk/src/grokcore/formlib/ftests/form/actions.py
===================================================================
--- grokcore.formlib/trunk/src/grokcore/formlib/ftests/form/actions.py	2010-11-01 17:53:52 UTC (rev 118076)
+++ grokcore.formlib/trunk/src/grokcore/formlib/ftests/form/actions.py	2010-11-01 17:54:26 UTC (rev 118077)
@@ -69,6 +69,7 @@
     size = FieldProperty(IMammoth['size'])
 
 class Edit(grok.EditForm):
+
     @grok.action("Apply")
     def handle_apply(self, **data):
         if self.applyData(self.context, **data):

Modified: grokcore.formlib/trunk/src/grokcore/formlib/meta.py
===================================================================
--- grokcore.formlib/trunk/src/grokcore/formlib/meta.py	2010-11-01 17:53:52 UTC (rev 118076)
+++ grokcore.formlib/trunk/src/grokcore/formlib/meta.py	2010-11-01 17:54:26 UTC (rev 118077)
@@ -17,12 +17,13 @@
 from martian.error import GrokError
 
 import grokcore.component
+from grokcore.component.meta import default_context
 from grokcore.formlib import formlib
 from grokcore.formlib import components
 
 class FormGrokker(martian.ClassGrokker):
     martian.component(components.GrokForm)
-    martian.directive(grokcore.component.context)
+    martian.directive(grokcore.component.context, get_default=default_context)
 
     def execute(self, factory, config, context, **kw):
         # Set up form_fields from context class if they haven't been



More information about the checkins mailing list