[Checkins] SVN: grokcore.startup/branches/zodbless/src/grokcore/startup/README.txt more documentation
Christian Klinger
cvs-admin at zope.org
Fri Apr 27 14:21:07 UTC 2012
Log message for revision 125339:
more documentation
Changed:
U grokcore.startup/branches/zodbless/src/grokcore/startup/README.txt
-=-
Modified: grokcore.startup/branches/zodbless/src/grokcore/startup/README.txt
===================================================================
--- grokcore.startup/branches/zodbless/src/grokcore/startup/README.txt 2012-04-27 14:12:07 UTC (rev 125338)
+++ grokcore.startup/branches/zodbless/src/grokcore/startup/README.txt 2012-04-27 14:21:04 UTC (rev 125339)
@@ -384,8 +384,36 @@
>>> import shutil
>>> shutil.rmtree(temp_dir)
+New ApplicaitonRoot, when a request comes to our zodbless Application
+a kind of Root is needed. This is an example of a simple RootFolder::
+ # -*- coding: utf-8 -*-
+ import grok
+ import grokcore.site
+ from zope import component, site, location
+
+
+ class ApplicationRoot(grok.GlobalUtility):
+ grok.implements(
+ grokcore.site.interfaces.IApplication,
+ grok.interfaces.IContext,
+ location.ILocation,
+ component.interfaces.ISite)
+ grok.provides(site.interfaces.IRootFolder)
+ grok.baseclass()
+
+ __name__ = None
+ __parent__ = None
+
+ def getSiteManager(self):
+ gsm = component.getGlobalSiteManager()
+ return gsm
+
+ def setSiteManager(self, sm):
+ pass
+
+
.. _grok: http://pypi.python.org/pypi/grok
.. _grokproject: http://pypi.python.org/pypi/grokproject
.. _Paste: http://pythonpaste.org/
More information about the checkins
mailing list