[Checkins]
SVN: grok/branches/philikon-ftest-layer-does-fixture-setup/src/grok/zcml.py
When we say <grok:grok package="foo" />,
we can't do the grokking rightaway. We need to
Philipp von Weitershausen
philikon at philikon.de
Fri Aug 24 07:51:45 EDT 2007
Log message for revision 79224:
When we say <grok:grok package="foo" />, we can't do the grokking rightaway. We need to
emit an action first. Why? Consider this example:
<include package="that_registers_a_few_things_e.g_a_permission" />
<grok:grok package="that_refers_to_the_permission" />
The directives in the first package that's included are not executed until the actions
are executed. If we grok the 2nd package rightaway, grok won't see all the stuff that
the first package defined. Therefore, we need to step back in line and do grokking
during action-execution time.
Changed:
U grok/branches/philikon-ftest-layer-does-fixture-setup/src/grok/zcml.py
-=-
Modified: grok/branches/philikon-ftest-layer-does-fixture-setup/src/grok/zcml.py
===================================================================
--- grok/branches/philikon-ftest-layer-does-fixture-setup/src/grok/zcml.py 2007-08-24 11:48:48 UTC (rev 79223)
+++ grok/branches/philikon-ftest-layer-does-fixture-setup/src/grok/zcml.py 2007-08-24 11:51:45 UTC (rev 79224)
@@ -30,4 +30,8 @@
def grokDirective(_context, package):
- grok.grok(package.__name__)
+ _context.action(
+ discriminator=('grok', package.__name__),
+ callable=grok.grok,
+ args=(package.__name__,)
+ )
More information about the Checkins
mailing list