Re: [Zope-dev] ZODB with twisted web.
Syver Enstad wrote at 2004-4-2 11:38 +0200: >I am checking out how to use ZODB with twisted web. I thought that I >would have the DB instance globally accesible and call the open method >to get a connection on each request. I thought that if I use >connection.getTransaction().commit() before sending the response I >will commit on the connection for that request. Is this necesarily >true when using twisted web because it is single threaded and it seems >that ZODB finds the correct transaction by checking the thread. This is true only, when you are working with "local transaction mode" (i.e. you are calling "connection.setLocalTransaction()"). Currently, this mode restricts you to a single transaction client. Neither relational databases nor other transactional clients understand this mode. Moreover, you cannot use "DBTab" to "mount" several ZODB storages. Jeremy is working on a new transaction interface for Zope 2.8./ZODB 3.3 I expect that it will fully support a thread independent transaction mode. -- Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: ZPT for CSS, anyone?
Shane Hathaway wrote: On Fri, 2 Apr 2004, Chris Withers wrote: Shane Hathaway wrote: I think it would be pretty neat. :-) And YET ANOTHER thing the poor Zope user has to learn when they start: Hardly. You're confusing a fun little project with the Zope core platform. Please don't put down people's ideas so quickly. Exactly. Chris, note that *most* users don't want or need dynamic CSS; this feature won't affect them. Tres. -- === Tres Seaver[EMAIL PROTECTED] Zope Corporation "Zope Dealers" http://www.zope.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Site Error
AP Meyer wrote: Is this a known bug? Yes. But Dieter fixed in recently in CVS HEAD (I think) Raphael Working without automatic refresh is very unhandy ;-) thanks Andre ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: ZPT for CSS, anyone?
On Fri, 2 Apr 2004, Chris Withers wrote: > Shane Hathaway wrote: > > > > I think it would be pretty neat. :-) > > And YET ANOTHER thing the poor Zope user has to learn when they start: Hardly. You're confusing a fun little project with the Zope core platform. Please don't put down people's ideas so quickly. Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: ZPT for CSS, anyone?
Here is one option I happen to like: generate CSS via XSLT from an XML dialect It has the following pre-requisite: make XSLT available as part of the Zope framework. Once you can rely on having XSLT as part of your framework (it really should be part of "batteries included" IMHO), you can do interesting things like providing a transformer for creating CSS files out of some sort of XML dialect. Here is a snippet of one we created at Ariel: ariel-letter Special style sheet to support printed Ariel Partners Letterhead #header
height
5 cm
right
1.0in
... If someone does not like the XSLT transformer that Zope would (in my proposal) provide out of the box, they are free to substitute their own. Since it would be integrated with ZPT, you could use ZPT expressions to create the XML dynamically out of pieces and parts. If the XSLT capability were integrated into ZPT somehow, it could be made cache aware for greatest efficiency. Of course, not everyone likes this kind of "generative programming" approach. I find that code generation tends to simplify alot of problems. Just my 2c, --Craeg Richard Jones wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 02 Apr 2004 18:44, Chris Withers wrote: Ah, okay, I think building something purely for CSS would REALLY suck. Something which could generically build SQL, CSS, Emails I would be less lielyl to vomit about... [snip] So persuade the Python guys to make string interpolation as powerful as you need it to be ;-) Why don't we have a good, long look at: http://www.python.org/cgi-bin/moinmoin/WebProgramming under the "Templating Systems" heading and make sure that someone else hasn't already come up with a good system that templates SQL, CSS, email, etc nicely. There's an awful lot of templating systems there... ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Site Error
On Apr 2, 2004, at 7:06, AP Meyer wrote: Is this a known bug? Working without automatic refresh is very unhandy ;-) thanks Andre Refresh is *not* a solution for everything because of the gyrations it has to go through to force the refreshing effect. Not everything will work with it, period. If you see weirdness then disable it and see if that helps. jens smime.p7s Description: S/MIME cryptographic signature ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Site Error
Is this a known bug? Working without automatic refresh is very unhandy ;-) thanks Andre btw I also get the following error trace on the Refresh tab of Zope: An exception occurred during the last refresh. Exception type: RuntimeError Exception value: Shouldn't load state for 1778 when the connection is closed Traceback (most recent call last): File "C:\Program Files\Zope-2.7.0\lib\python\App\RefreshFuncs.py", line 182, in performSafeRefresh if not performRefresh(jar, productid): File "C:\Program Files\Zope-2.7.0\lib\python\App\RefreshFuncs.py", line 171, in performRefresh Application.reinstall_product(app, productid) File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line 844, in reinstall_product folder_permissions, raise_exc=1, log_exc=0) File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line 732, in install_product initmethod(context) File "c:\myZope-2.7\Products\MyContract\__init__.py", line 13, in initialize import Contract File "c:\myZope-2.7\Products\MyContract\Contract.py", line 58, in ? registerType(Contract, PROJECTNAME) File "c:\myZope-2.7\Products\Archetypes\ArchetypeTool.py", line 275, in registerType tc(klass, package) File "c:\myZope-2.7\Products\Archetypes\ArchetypeTool.py", line 847, in cb = lambda klass, package:self.registerType(klass, package) File "C:\Program Files\Zope-2.7.0\lib\python\ZODB\Connection.py", line 551, in setstate raise RuntimeError(msg) RuntimeError: Shouldn't load state for 1778 when the connection is closed Andreas Jung wrote: Try to turn off refreshing for the product (remove refresh.txt). -aj --On Freitag, 2. April 2004 11:09 Uhr +0200 AP Meyer <[EMAIL PROTECTED]> wrote: Hi Zopers The last few days I was fiddling around with Archetypes again and tried the multiValued slot in order to add multiple entries of a field to an instance. This does not seem to work as expected, though. Do I need a newer version of Archetypes or am I doing things wrong? Even more disturbing, however, I frequently get the following error message and am not sure what it means and whether it is related to Plone 2.0/Archetypes 1.2.5-rc2 or just Zope 2.7. Site error This site encountered an error trying to fulfill your request. The errors were: Error Type ValueError Error Value Cache values may only be in one cache. Request made at 2004/04/02 11:02:01.270 GMT+2 thanks for any hints Andre -- Dr. André P. Meyerhttp://home.hccnet.nl/a.meyer/ TNO FEL Command & Control and Simulation, http://www.fel.tno.nl/div2/ Delft Cooperation on Intelligent Systems, http://www.decis.nl/ -- Dr. Andre P. Meyerhttp://home.hccnet.nl/a.meyer/ TNO FEL Command & Control and Simulation, http://www.fel.tno.nl/div2/ Delft Cooperation on Intelligent Systems, http://www.decis.nl/ -- -- The disclaimer that applies to e-mail from TNO Physics and Electronics Laboratory can be found on: http://www.tno.nl/disclaimer/email.html -- ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: ZPT for CSS, anyone?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 02 Apr 2004 18:44, Chris Withers wrote: > Ah, okay, I think building something purely for CSS would REALLY suck. > > Something which could generically build SQL, CSS, Emails I would be less > lielyl to vomit about... > >[snip] > > So persuade the Python guys to make string interpolation as powerful as you > need it to be ;-) Why don't we have a good, long look at: http://www.python.org/cgi-bin/moinmoin/WebProgramming under the "Templating Systems" heading and make sure that someone else hasn't already come up with a good system that templates SQL, CSS, email, etc nicely. There's an awful lot of templating systems there... Richard -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAbTr0rGisBEHG6TARApGiAJ4z7ZTRh/hsg87UnUP1yaoePpil0ACfTtrH tAkw1jDdFJfaE9sjkI5Ri5I= =0Ked -END PGP SIGNATURE- ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] ZODB with twisted web.
I am checking out how to use ZODB with twisted web. I thought that I would have the DB instance globally accesible and call the open method to get a connection on each request. I thought that if I use connection.getTransaction().commit() before sending the response I will commit on the connection for that request. Is this necesarily true when using twisted web because it is single threaded and it seems that ZODB finds the correct transaction by checking the thread. I am a bit confused here and would rather like to avoid having one request commit changes for another request. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Site Error
Try to turn off refreshing for the product (remove refresh.txt). -aj --On Freitag, 2. April 2004 11:09 Uhr +0200 AP Meyer <[EMAIL PROTECTED]> wrote: Hi Zopers The last few days I was fiddling around with Archetypes again and tried the multiValued slot in order to add multiple entries of a field to an instance. This does not seem to work as expected, though. Do I need a newer version of Archetypes or am I doing things wrong? Even more disturbing, however, I frequently get the following error message and am not sure what it means and whether it is related to Plone 2.0/Archetypes 1.2.5-rc2 or just Zope 2.7. Site error This site encountered an error trying to fulfill your request. The errors were: Error Type ValueError Error Value Cache values may only be in one cache. Request made at 2004/04/02 11:02:01.270 GMT+2 thanks for any hints Andre -- Dr. André P. Meyerhttp://home.hccnet.nl/a.meyer/ TNO FEL Command & Control and Simulation, http://www.fel.tno.nl/div2/ Delft Cooperation on Intelligent Systems, http://www.decis.nl/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Site Error
Hi Zopers The last few days I was fiddling around with Archetypes again and tried the multiValued slot in order to add multiple entries of a field to an instance. This does not seem to work as expected, though. Do I need a newer version of Archetypes or am I doing things wrong? Even more disturbing, however, I frequently get the following error message and am not sure what it means and whether it is related to Plone 2.0/Archetypes 1.2.5-rc2 or just Zope 2.7. Site error This site encountered an error trying to fulfill your request. The errors were: Error Type ValueError Error Value Cache values may only be in one cache. Request made at 2004/04/02 11:02:01.270 GMT+2 thanks for any hints Andre -- Dr. André P. Meyerhttp://home.hccnet.nl/a.meyer/ TNO FEL Command & Control and Simulation, http://www.fel.tno.nl/div2/ Delft Cooperation on Intelligent Systems, http://www.decis.nl/ -- -- The disclaimer that applies to e-mail from TNO Physics and Electronics Laboratory can be found on: http://www.tno.nl/disclaimer/email.html -- ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: ZPT for CSS, anyone?
Shane Hathaway wrote: I think it would be pretty neat. :-) And YET ANOTHER thing the poor Zope user has to learn when they start: Python ZConfig ZCML ZPT (this thing) ...and that's assuming (this thing) totally replaces DTMhelL, which you and i both know it won't :-( Still, maybe a TALES-in-plain-text thing has some merits, but then you want defines, a repeats, and you end up with TAL. Repeats wouldn't make sense in this language. Yeah they would, every language needs repeats in the end... Conditions would, but they would apply to the whole rule, not individual attributes. Ah, okay, I think building something purely for CSS would REALLY suck. Something which could generically build SQL, CSS, Emails I would be less lielyl to vomit about... template=""" p { color: %(color)s; background-color: %(bgcolor)s; } """ preferences = context.getProperty('preferences',{}) dict = { 'color':preferences.get('color','gray'), 'bgcolor':preferences.get('bgcolor'white'), } return template % dict That's a mess. So persuade the Python guys to make string interpolation as powerful as you need it to be ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] [Weakness] analysis of Zope startup problems
Zope 2.7 delays access to log files until Zope is properly set up. This means: log files cannot be used to analyse startup problems. The official advice to analyse startup problems is to start Zope in the foreground and interpret the console log messages. However, this does *NOT* work when Zope is not running in debug mode. "Zope.Startup.ZopeStarter.setupStartupHandler" expressly suppresses messages to "stderr" when Zope is not running in debug mode. Apparently, we do not have an easy way to analyse startup problems for Zope in production mode. In my view, this is really bad. Please provide a way to control how startup messages should be handled. The best place would be a file (at least for all installations that do not start Zope as root and later switch the effective user). I suggest to always use the standard log file unless told otherwise by an explicit configuration option. -- Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )