[Checkins] SVN: z3c.saconfig/trunk/src/z3c/saconfig/README.txt
Expand explanation about the ``Session`` class.
Martijn Faassen
faassen at infrae.com
Fri Jun 20 07:42:17 EDT 2008
Log message for revision 87590:
Expand explanation about the ``Session`` class.
Changed:
U z3c.saconfig/trunk/src/z3c/saconfig/README.txt
-=-
Modified: z3c.saconfig/trunk/src/z3c/saconfig/README.txt
===================================================================
--- z3c.saconfig/trunk/src/z3c/saconfig/README.txt 2008-06-20 09:08:26 UTC (rev 87589)
+++ z3c.saconfig/trunk/src/z3c/saconfig/README.txt 2008-06-20 11:42:16 UTC (rev 87590)
@@ -95,9 +95,21 @@
We are done with configuration now. As you have seen it involves
setting up two utilities, ``IEngineFactory`` and ``IScopedSession``,
where only the latter is really needed in this globally shared session
-use case. We can now use the ``Session`` object create a session which
-will behave according to the utility we provided::
+use case.
+After the ``IScopedSession`` utility is registered, one can import the
+``Session`` class from z3c.saconfig. This ``Session`` class is like
+the one you'd produce with ``sessionmaker`` from
+SQLAlchemy. `z3c.saconfig.Session`` is intended to be the only
+``Session`` class you'll ever need, as all configuration and Zope
+integration is done automatically for you by ``z3c.saconfig``,
+appropriate the context in Zope where you use it. There is no need to
+create ``Session`` classes yourself with ``sessionmaker`` or
+``scoped_sesion`` anymore.
+
+We can now use the ``Session`` class to create a session which will
+behave according to the utility we provided::
+
>>> from z3c.saconfig import Session
>>> session = Session()
More information about the Checkins
mailing list