durusmail: quixote-users: Re: quixote: next step
Re: quixote: next step
2000-10-25
2000-10-25
Resend: Re: quixote: next step
2000-10-25
Re: quixote: next step
2000-10-26
2000-10-26
2000-10-26
Python Interfaces
2000-12-04
2000-12-04
Re: quixote: next step
Andrew Kuchling
2000-10-25
On Wed, Oct 25, 2000 at 12:31:04AM +0200, Kaweh Kazemi wrote:
>old: _session_coll = None
>new: _session_coll = SessionCollection()
>i'm not sure, if this is correct, but it solves my problem.

I think the actual fix is to the example quixote.cgi, which should
create a session collection and set it as the object to be used.  I
don't like the idea of having session.py magically create a
SessionCollection object for you, since it goes against the Quixote
design principle of "No magical automatic behaviour".

The patch I'll apply is included below.

I've also created a quixote-users mailing list; you can subscribe to
it at http://www.mems-exchange.org/mailman/listinfo/quixote-users .

--amk


Index: quixote.cgi
===================================================================
RCS file: /projects/cvsroot/mems/quixote/quixote.cgi,v
retrieving revision 1.4
diff -u -r1.4 quixote.cgi
--- quixote.cgi 2000/06/01 19:24:40     1.4
+++ quixote.cgi 2000/10/25 18:41:04
@@ -1,6 +1,15 @@
 #!/www/python/bin/python

-from quixote import publish, imphooks

+from quixote import publish, imphooks, session
+
+# Enable the PTL import hook, so that .ptl files can be imported
 imphooks.install()
+
+# Create a session collection object and set it as the object to be used
+# for storing sessions.
+sess_coll = session.SessionCollection()
+session.set_session_collection( sess_coll )
+
+# Call the publisher
 publish.call_fcgi()



reply