[Checkins] SVN: grok/trunk/src/grok/meta.py implemented Grokker for global_utility directive

Wolfgang Schnerring wosc at wosc.de
Sat Jan 6 11:53:43 EST 2007


Log message for revision 71745:
  implemented Grokker for global_utility directive

Changed:
  U   grok/trunk/src/grok/meta.py

-=-
Modified: grok/trunk/src/grok/meta.py
===================================================================
--- grok/trunk/src/grok/meta.py	2007-01-06 16:49:20 UTC (rev 71744)
+++ grok/trunk/src/grok/meta.py	2007-01-06 16:53:42 UTC (rev 71745)
@@ -222,3 +222,14 @@
         component.provideAdapter(
             resource_factory, (IDefaultBrowserLayer,),
             interface.Interface, name=module_info.dotted_name)
+
+class GlobalUtilityDirectiveGrokker(grok.ModuleGrokker):
+
+    def register(self, context, module_info, templates):
+        infos = module_info.getAnnotation('grok.global_utility', [])
+    
+        for info in infos:
+            component.provideUtility(info.factory(),
+                                     provides=info.provides,
+                                     name=info.name)
+



More information about the Checkins mailing list