[Zope-Checkins] SVN: Zope/trunk/releases/Zope2/SETUP.cfg Only include *.py files for the scripts (in particular, DON'T include
Log message for revision 40126: Only include *.py files for the scripts (in particular, DON'T include the ZODBTools directory which was previously caught up in the '*' glob and confused zpkgsetup). Also include ZODBTools scripts (again, only *.py files). Changed: U Zope/trunk/releases/Zope2/SETUP.cfg -=- Modified: Zope/trunk/releases/Zope2/SETUP.cfg === --- Zope/trunk/releases/Zope2/SETUP.cfg 2005-11-15 14:54:47 UTC (rev 40125) +++ Zope/trunk/releases/Zope2/SETUP.cfg 2005-11-15 15:08:36 UTC (rev 40126) @@ -1,6 +1,7 @@ documentation doc/*.txt -scriptutilities/* +scriptutilities/*.py +scriptutilities/ZODBTools/*.py scriptzopetest data-files . ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/Zope-2_9-branch/releases/Zope2/SETUP.cfg Merge r40126 from the trunk:
Log message for revision 40127: Merge r40126 from the trunk: Only include *.py files for the scripts (in particular, DON'T include the ZODBTools directory which was previously caught up in the '*' glob and confused zpkgsetup). Also include ZODBTools scripts (again, only *.py files). Changed: U Zope/branches/Zope-2_9-branch/releases/Zope2/SETUP.cfg -=- Modified: Zope/branches/Zope-2_9-branch/releases/Zope2/SETUP.cfg === --- Zope/branches/Zope-2_9-branch/releases/Zope2/SETUP.cfg 2005-11-15 15:08:36 UTC (rev 40126) +++ Zope/branches/Zope-2_9-branch/releases/Zope2/SETUP.cfg 2005-11-15 15:13:24 UTC (rev 40127) @@ -1,6 +1,7 @@ documentation doc/*.txt -scriptutilities/* +scriptutilities/*.py +scriptutilities/ZODBTools/*.py scriptzopetest data-files . ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Coders] Zope tests: 7 OK
Summary of messages to the zope-tests list. Period Mon Nov 14 12:01:01 2005 UTC to Tue Nov 15 12:01:01 2005 UTC. There were 7 messages: 7 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Mon Nov 14 22:00:44 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003555.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Mon Nov 14 22:02:14 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003556.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Mon Nov 14 22:03:44 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003557.html Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Mon Nov 14 22:05:14 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003558.html Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Mon Nov 14 22:06:44 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003559.html Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Mon Nov 14 22:08:14 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003560.html Subject: OK : Zope-trunk Python-2.4.2 : Linux From: Zope Unit Tests Date: Mon Nov 14 22:09:44 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003561.html ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
Re: [Zope-dev] Re: Timing the opening of network ports
2005/11/12, Florent Guillaume [EMAIL PROTECTED]: +1 on the general goals, however I have no idea if it's easy to implement. Does this sound reasonable to make the behaviour of opening the ports configurable? Does anybody have an idea how hard this would be to do? I was curious and tried it. Sadly the patches are against 2.7.8, but the patches itself are relative small and should be easy to apply. I did not write unittests. I just wanted to invest 5 minutes to see how it can be done, and suddenly could not stop finishing it. If somebody reminds me of it in two or three weeks, I will make patches against current with unit tests. I am not happy with how I implemented the listening delay. patching the listen method to only listen when the configuration says fast_listen is not good. but otherwise I would have to patch the medusa sources itself. If this is feasible I can do it, is medusa maintained here or in another project? To configure it, add a fast_listen False to the http-server section in your config. Patrick ZServer_HTTPServer.py.patch Description: Binary data ZServer_component.xml.patch Description: Binary data ZServer_datatypes.py.patch Description: Binary data Zope_Startup___init__py.patch Description: Binary data ___ Zope-Dev maillist - Zope-Dev@zope.org 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] help with url rewriting
Faheem Mitha wrote: Turns out the problem was indeed with the Proxy, I had to change to Allow from all inside the proxy.conf, to enable reverse proxying. Order deny,allow #Deny from all #Allow from .your_domain.com Allow from all I'm not sure an open proxy is that hot an idea, but this has nothing to do with Zope. I suggest you go and ask on #apache on irc.freenode.net 1) I can still access my plone site unauthenticated via http://machine_address:9673/test_plone. Again, nothing to do with Zope. iptables is the way to go, and I bet £5 you lock yourself out of your machine within 2 hrs of playing with this ;-) Go to #debian on irc.freenode.net and wear flameproof clothing ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem Inserting zsql query result
Ivan Stout wrote: Yes, the full error message is the following: ProgrammingError: (1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0\n)' at line 9) Here is the select portion of the query I am running: select count(*) as order I'd look for the bit of your SQL that is '0' at the end of a line ;-) What's your full ZSQL? (well, actually, boil it down to a minimal test case that fails...) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] experience w/ filestorage mount points? maximum?
Christoph Berendes wrote: I am writing to tap the list's experience with running a single zope instance with a large number (30, 500, 2000?) of mount points. Why do you want so many ;-) We're hosting a number of client sites, and for each client, e.g. clientX, we have a mount point: zodb_db clientX mount-point /clientX filestorage path $INSTANCE/var/clientX/Data.fs /filestorage /zodb_db Why not just keep them all in the same .fs file? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: zope 2.8.4 on windows 98
Fernando Martins wrote: File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\WinSignalHandler.py, lin e 84, in createEventSecurityObject sidEveryone.Initialize(ntsecuritycon.SECURITY_WORLD_SID_AUTHORITY,1) pywintypes.error: (120, 'InitializeSid', 'This function is only valid in Win32 m ode.') Andreas, was your testing with a 2.8.4-based system? I remember reading about the work that Mark Hammond did to make things better for Zope on Windows, but it looks like this might have spelled the end for Zope working on Win98 ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: zope 2.8.4 on windows 98
--On 15. November 2005 11:09:08 + Chris Withers [EMAIL PROTECTED] wrote: Fernando Martins wrote: File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\WinSignalHandler.py, lin e 84, in createEventSecurityObject sidEveryone.Initialize(ntsecuritycon.SECURITY_WORLD_SID_AUTHORITY,1) pywintypes.error: (120, 'InitializeSid', 'This function is only valid in Win32 m ode.') Andreas, was your testing with a 2.8.4-based system? I remember reading about the work that Mark Hammond did to make things better for Zope on Windows, but it looks like this might have spelled the end for Zope working on Win98 ;-) I think we are using 2.8.1 (we are using our own Zope version which is always tied to the normale release schedule). -aj pgpj3TFOlQdzZ.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Render a string as tal
Paul Winkler wrote: On Mon, Nov 14, 2005 at 01:19:18PM -0700, Mark Gibson wrote: I would like to be able to render an arbitrary string as tal, having the tal statements evaluated correctly. How would I go about doing this? I assume you mean TALES expressions. See: http://zopelabs.com/cookbook/1037762730 He might mean a full blown page template of course ;-) ...in which case he probably wants to instantiate a ZPT and execute it, but that feels horribly expensive, unless it's persisted somewhere like the ZODB. Mark, what are you actually trying to do here? ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] filename splitter
Hi, I don't usually do this but I need your advise on something. It's a filename splitter for a KeywordIndex of File objects. http://www.peterbe.com/plog/filename-splitter By applying this splitter I hope to be able to search for files by parts of the filename. Has anything like this been done before? Am I on the right track? Do you see any pitfalls? -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Setting a session's domain
Hi all, I'm developing a site that has multiple subdomains (i.e.: http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody point me how can I get the session to be shared across these different subdomains? Unless someone can give me an opposite advise, I think I need to specify a domain to the cookie which is trivial for regular cookies but I just can't find how to do it with sessions (notice that I am I'm using Zope's regular request.SESSION). Thanks in advance, Pablo ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem Inserting zsql query result
Chris, I was preparing to reply to your e-mail when I discovered the problem. I had been assuming it was the query zsql method value that was the problem (due to the 0\n error), when it was actually a typo in the insert zsql method (I had failed to add a , when adding the additional field to insert . . . my eyes must be getting old). Anyway, I will try not to make so many assumption when I run it future bugs. Thank you for your help, Ivan On 11/15/05, Chris Withers [EMAIL PROTECTED] wrote: Ivan Stout wrote: Yes, the full error message is the following: ProgrammingError: (1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0\n)' at line 9) Here is the select portion of the query I am running: select count(*) as orderI'd look for the bit of your SQL that is '0' at the end of a line ;-) What's your full ZSQL? (well, actually, boil it down to a minimal testcase that fails...)cheers,Chris--Simplistix - Content Management, Zope Python Consulting- http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Setting a session's domain
- Original Message - From: Pablo Ziliani [EMAIL PROTECTED] To: Zope zope@zope.org Sent: Tuesday, November 15, 2005 8:15 AM Subject: [Zope] Setting a session's domain Hi all, I'm developing a site that has multiple subdomains (i.e.: http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody point me how can I get the session to be shared across these different subdomains? Unless someone can give me an opposite advise, I think I need to specify a domain to the cookie which is trivial for regular cookies but I just can't find how to do it with sessions (notice that I am I'm using Zope's regular request.SESSION). How about creating subfolders, one for each subdomain, and then use URL rewriting to point to the required subfolder. The top level folder would contain your login/authenication/session info which could be accessed via acquisition. Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Setting a session's domain
Jonathan wrote: Hi all, I'm developing a site that has multiple subdomains (i.e.: http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody point me how can I get the session to be shared across these different subdomains? Unless someone can give me an opposite advise, I think I need to specify a domain to the cookie which is trivial for regular cookies but I just can't find how to do it with sessions (notice that I am I'm using Zope's regular request.SESSION). How about creating subfolders, one for each subdomain, and then use URL rewriting to point to the required subfolder. The top level folder would contain your login/authenication/session info which could be accessed via acquisition. Hello Jonathan and thanks for your help, Actually, the site is working. I have something close to what you said with the difference that I am getting the rewritings go to the same folder. Unfortunately this doesn't work because of the way that session's cookies are served by default in Zope (including the subdomain). In other words, no matter how you construct your internal folder hierarchy, browsers won't submit a session cookie from a subdomain to another. Cookies specification define a keyword to set the domain from which the cookie should be submitted, but I don't know how to set it for Zope's default session. Or if I'm completely missing something. Thanks, Pablo ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] filename splitter
Peter Bengtsson schrieb: Hi, I don't usually do this but I need your advise on something. It's a filename splitter for a KeywordIndex of File objects. http://www.peterbe.com/plog/filename-splitter By applying this splitter I hope to be able to search for files by parts of the filename. Has anything like this been done before? Am I on the right track? Do you see any pitfalls? I used a similar approach when we had to enable people to search for products based on name. So splitting on caMel and digits was done too. Additionally I had a stopword list in my case (to catch A4 P3 and so on) For filenames I guess you dont need this. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Setting a session's domain
- Original Message - From: Pablo Ziliani [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED]; Zope zope@zope.org Sent: Tuesday, November 15, 2005 8:53 AM Subject: Re: [Zope] Setting a session's domain Jonathan wrote: Hi all, I'm developing a site that has multiple subdomains (i.e.: http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody point me how can I get the session to be shared across these different subdomains? Unless someone can give me an opposite advise, I think I need to specify a domain to the cookie which is trivial for regular cookies but I just can't find how to do it with sessions (notice that I am I'm using Zope's regular request.SESSION). How about creating subfolders, one for each subdomain, and then use URL rewriting to point to the required subfolder. The top level folder would contain your login/authenication/session info which could be accessed via acquisition. Hello Jonathan and thanks for your help, Actually, the site is working. I have something close to what you said with the difference that I am getting the rewritings go to the same folder. Unfortunately this doesn't work because of the way that session's cookies are served by default in Zope (including the subdomain). In other words, no matter how you construct your internal folder hierarchy, browsers won't submit a session cookie from a subdomain to another. Cookies specification define a keyword to set the domain from which the cookie should be submitted, but I don't know how to set it for Zope's default session. Or if I'm completely missing something. try googling: site:www.zope.org set cookie domain Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Problems using forms to upload files to Zope
Here's what I'm trying to accomplish:1. The user fills out a form page with various fields2. The user selects a file to upload3. when the user hits submit two things should happen: - The file selected is uploaded - all the filled out form fields are written to the database (MS SQL)This is my current problem:The writting to the database part works fine on it's own, but when combined with the file upload I get this error Error Type: AttributeError Error Value: 'NoneType' object has no attribute 'headers'My code:*HTML FORM**htmlh1 tal:content=template/titletitle/h1 pFill out the form below to update the website with the appropriate info:/pform action="">table width=100% border=0 cellspacing=0 cellpadding=0 tr td width=16% height=27 align=rightstrongYour Dept: /strong/td td width=84%input type=text name=department/td /tr tr td height=27 align=rightstrongDocument Title:/strong/td tdinput type=text name=title/td /tr tr td height=30 align=rightstrongFilename:/strong/td tdinput type=file name=upload_filename /td /tr tr td height=28 align=rightstrongVersion of File :/strong/td tdinput type=text name=version/td /tr tr td height=28 align=rightstrongURL:/strong/td tdinput type=text name=url/td /tr tr td height=33 align=rightstrongOwner Approved:/strong/td tdinput type=text name=ownerapp/td /tr tr td align=rightstrongISO Approved:/strong/td tdinput type=text name=isoapp/td /tr tr td height=41 align=rightstrongComments: /strong/td td rowspan=2textarea name=comments cols=60 rows=5 /textarea/td /tr tr td height=85 align=right valign=topnbsp;/td /tr tr td height=29 align=rightstrongDate/strong/td tdinput type=text name=date/td /tr tr td height=62 align=right/td tdp input type=submit id=submit name=submit / /p /td /tr/tablep/formhrpReturn to the a href="" page/a/p/html **uploadForm.pydef writeDB(): # get sql method insert=container['insert_fileapps'] REQUEST=context.REQUEST department = REQUEST.form.get('department') title = REQUEST.form.get('title') filename = REQUEST.form.get('upload_filename') content_type=filename.headers['Content-Type'] if content_type.find('image')!=-1: context.manage_addImage(id, file, title) else: context.manage_addFile(id, file, title) return 'Finished' version = REQUEST.form.get('version') url = ""> ownerapp = REQUEST.form.get('ownerapp') isoapp = REQUEST.form.get('isoapp') comments = REQUEST.form.get('comments') date = REQUEST.form.get('date') filename=id filename = filename.split('\\')[-1] # call it, passing arguments insert( department=department, title=title, filename=filename, version=version, url="" ownerapp=ownerapp, isoapp=isoapp, comments=comments, date=date) # return a confirmation page page=container[' thanks.html'] return page()writeDB()Any help provided would be greatly appreciatedThanks in advance,mjakowlewPS: I'm sorry if I went about posting this in the wrong spot or the wrong way, I'm new to this ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: still having problems
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris McDonough wrote: On Nov 14, 2005, at 9:21 PM, Dennis Allison wrote: snip Questions: ~~ What is the cause of the locking problem? Does ZMySQLDA/MySQL- Python/Zope have some path which should have called begin to get a lock and did not? No idea, sorry. I assume this worked OK under 2.7.X and the only real meaningful difference is a move to 2.8? What needs to be done to make session variables stable? Making transactions work properly by tracking down the abort symptom above is the best start just so you don't go on a wild goose chase. Does the Temporary Storage method need to be extended to allow for rolling back a transaction? I don't think so. TemporaryStorage is already transactional. Dennis isn't using TemporaryStorage -- he is mounting a ZEO client storage at '/temp_folder' (which, of course, is also transactional). My guess is that something about the shared ZEO sessions, along with perhaps MySQL, is generating the problem. Any other help or advice would be appreciated. I'm afraid that the only way this problem (or set of two problems, or three, or however many it turns out to be) will be solved is to for someone to be able to replicate the symptom. I don't suppose you can tell us how to do that, can you? Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDefD9+gerLs4ltQ4RAlQ5AJ4p70gH/LRhvsyoaGe9VvPlXkwjGwCfb4vE tQEWCJE/Qp18idiV27CL0bI= =J8zD -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems using forms to upload files to Zope
You should use the getContentType() method - look in the zope book (API - File). Jonathan - Original Message - From: Mike Jakowlew To: zope@zope.org Sent: Tuesday, November 15, 2005 9:25 AM Subject: [Zope] Problems using forms to upload files to Zope Here's what I'm trying to accomplish:1. The user fills out a form page with various fields2. The user selects a file to upload3. when the user hits submit two things should happen: - The file selected is uploaded - all the filled out form fields are written to the database (MS SQL)This is my current problem:The writting to the database part works fine on it's own, but when combined with the file upload I get this error Error Type: AttributeErrorError Value: 'NoneType' object has no attribute 'headers'My code:*HTML FORM**htmlh1 tal:content="template/title"title/h1 pFill out the form below to update the website with the appropriate info:/pform action=""table width="100%" border="0" cellspacing="0" cellpadding="0" tr td width="16%" height="27" align="right"strongYour Dept: /strong/td td width="84%"input type="text" name="department"/td /tr tr td height="27" align="right"strongDocument Title:/strong/td tdinput type="text" name="title"/td /tr tr td height="30" align="right"strongFilename:/strong/td tdinput type="file" name="upload_filename" /td /tr tr td height="28" align="right"strongVersion of File :/strong/td tdinput type="text" name="version"/td /tr tr td height="28" align="right"strongURL:/strong/td tdinput type="text" name="url"/td /tr tr td height="33" align="right"strongOwner Approved:/strong/td tdinput type="text" name="ownerapp"/td /tr tr td align="right"strongISO Approved:/strong/td tdinput type="text" name="isoapp"/td /tr tr td height="41" align="right"strongComments: /strong/td td rowspan="2"textarea name="comments" cols="60" rows="5" /textarea/td /tr tr td height="85" align="right" valign="top"nbsp;/td /tr tr td height="29" align="right"strongDate/strong/td tdinput type="text" name="date"/td /tr tr td height="62" align="right"/td tdp input type="submit" id="submit" name="submit" / /p /td /tr/tablep/formhrpReturn to the a href=""News page/a/p/html**uploadForm.pydef writeDB(): # get sql method insert=container['insert_fileapps'] REQUEST=context.REQUEST department = REQUEST.form.get('department') title = REQUEST.form.get('title') filename = REQUEST.form.get('upload_filename') content_type=filename.headers['Content-Type'] if content_type.find('image')!=-1: context.manage_addImage(id, file, title) else: context.manage_addFile(id, file, title) return 'Finished' version = REQUEST.form.get('version') url = ""> ownerapp = REQUEST.form.get('ownerapp') isoapp = REQUEST.form.get('isoapp') comments = REQUEST.form.get('comments') date = REQUEST.form.get('date') filename=id filename = filename.split('\\')[-1] # call it, passing arguments insert( department=department, title=title, filename=filename, version=version, url="" ownerapp=ownerapp, isoapp=isoapp, comments=comments, date=date) # return a confirmation page page=container[' thanks.html'] return page()writeDB()Any help provided would be greatly appreciatedThanks in advance,mjakowlewPS: I'm sorry if I went about posting this in the wrong spot or the wrong way, I'm new to this ___Zope maillist - Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announcehttp://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Problems using forms to upload files to Zope
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Jakowlew wrote: Here's what I'm trying to accomplish: 1. The user fills out a form page with various fields 2. The user selects a file to upload 3. when the user hits submit two things should happen: - The file selected is uploaded - all the filled out form fields are written to the database (MS SQL) This is my current problem: The writting to the database part works fine on it's own, but when combined with the file upload I get this error *Error Type: AttributeError* *Error Value: 'NoneType' object has no attribute 'headers'* HTML forms which upload files need to set the 'enctype' attribute of the form element to 'multipart/formdata', and must use POST rather than GET, e.g.:: form method=POST action=uploadForm.py enctype=multipart/formdata Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDefVO+gerLs4ltQ4RAo0zAKCPYlJfHriHHMcTnx8sz10YI9aGVACgynu6 Syk9HewjLoBOeowSPvTXl3c= =hBzv -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems using forms to upload files to Zope
Mike Jakowlew schrieb: Here's what I'm trying to accomplish: 1. The user fills out a form page with various fields 2. The user selects a file to upload 3. when the user hits submit two things should happen: - The file selected is uploaded - all the filled out form fields are written to the database (MS SQL) This is my current problem: The writting to the database part works fine on it's own, but when combined with the file upload I get this error *Error Type: AttributeError* *Error Value: 'NoneType' object has no attribute 'headers'* My code: *HTML FORM** html h1 tal:content=template/titletitle/h1 pFill out the form below to update the website with the appropriate info:/p form action=uploadForm.py here is the problem You need enctype=multipart/form-data compare it with filelibrary example or the ZMI fileupload which basically does the same. table width=100% border=0 cellspacing=0 cellpadding=0 tr td width=16% height=27 align=rightstrongYour Dept: /strong/td td width=84%input type=text name=department/td /tr ... *snip* --- HTH Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem Inserting zsql query result
Still an amazingly poor error message by your mysql. (perhaps time to upgrade to postgresql :) On 11/15/05, Ivan Stout [EMAIL PROTECTED] wrote: Chris, I was preparing to reply to your e-mail when I discovered the problem. I had been assuming it was the query zsql method value that was the problem (due to the 0\n error), when it was actually a typo in the insert zsql method (I had failed to add a , when adding the additional field to insert . . . my eyes must be getting old). Anyway, I will try not to make so many assumption when I run it future bugs. Thank you for your help, Ivan On 11/15/05, Chris Withers [EMAIL PROTECTED] wrote: Ivan Stout wrote: Yes, the full error message is the following: ProgrammingError: (1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0\n)' at line 9) Here is the select portion of the query I am running: select count(*) as order I'd look for the bit of your SQL that is '0' at the end of a line ;-) What's your full ZSQL? (well, actually, boil it down to a minimal test case that fails...) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem Inserting zsql query result
En/na Peter Bengtsson ha escrit: Still an amazingly poor error message by your mysql. (perhaps time to upgrade to postgresql :) Well, I just started tinkering with postgresql and already had my share of meaningless error messages ;-) And the Operational Error in psycopg 2.0b4 wasn't much helpful either :-D (I know, I know, not a postgresql problem, and it's fixed now). Bye -- Luca Olivetti Wetron Automatización S.A. http://www.wetron.es/ Tel. +34 93 5883004 Fax +34 93 5883007 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Problems using forms to upload files to Zope
Okay I corrected:form action="" method=post enctype=multipart/form-dataand also tried the getContentType, but I get the error: Error Type: AttributeError Error Value: FileUpload instance has no attribute 'getContentType'uploadForm.pydef content_type(self): return self.getContentType()def writeDB(): # get sql method insert=container['insert_fileapps'] REQUEST=context.REQUEST department = REQUEST.form.get('department') title = REQUEST.form.get ('title') filename = REQUEST.form.get('upload_filename') upload_contents= content_type(filename) if content_type.find('image')!=-1: context.manage_addImage(id, file, title) else: context.manage_addFile(id, file, title) return 'Finished' version = REQUEST.form.get('version') url = ""> ownerapp = REQUEST.form.get('ownerapp') isoapp = REQUEST.form.get('isoapp') comments = REQUEST.form.get('comments') date = REQUEST.form.get('date') filename=id filename = filename.split('\\')[-1] # call it, passing arguments insert( department=department, title=title, filename=filename, version=version, url="" ownerapp=ownerapp, isoapp=isoapp, comments=comments, date=date) # return a confirmation page page=container['thanks.html '] return page()writeDB()On 11/15/05, Mike Jakowlew [EMAIL PROTECTED] wrote: Here's what I'm trying to accomplish:1. The user fills out a form page with various fields 2. The user selects a file to upload3. when the user hits submit two things should happen: - The file selected is uploaded - all the filled out form fields are written to the database (MS SQL)This is my current problem:The writting to the database part works fine on it's own, but when combined with the file upload I get this error Error Type: AttributeError Error Value: 'NoneType' object has no attribute 'headers'My code:*HTML FORM**htmlh1 tal:content=template/titletitle/h1 pFill out the form below to update the website with the appropriate info:/pform action="">table width=100% border=0 cellspacing=0 cellpadding=0 tr td width=16% height=27 align=rightstrongYour Dept: /strong/td td width=84%input type=text name=department/td /tr tr td height=27 align=rightstrongDocument Title:/strong/td tdinput type=text name=title/td /tr tr td height=30 align=rightstrongFilename:/strong/td tdinput type=file name=upload_filename /td /tr tr td height=28 align=rightstrongVersion of File :/strong/td tdinput type=text name=version/td /tr tr td height=28 align=rightstrongURL:/strong/td tdinput type=text name=url/td /tr tr td height=33 align=rightstrongOwner Approved:/strong/td tdinput type=text name=ownerapp/td /tr tr td align=rightstrongISO Approved:/strong/td tdinput type=text name=isoapp/td /tr tr td height=41 align=rightstrongComments: /strong/td td rowspan=2textarea name=comments cols=60 rows=5 /textarea/td /tr tr td height=85 align=right valign=topnbsp;/td /tr tr td height=29 align=rightstrongDate/strong/td tdinput type=text name=date/td /tr tr td height=62 align=right/td tdp input type=submit id=submit name=submit / /p /td /tr/tablep/formhrpReturn to the a href="" page/a/p/html ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] experience w/ filestorage mount points? maximum?
Why so many, in separate files, you ask... 1. why not? (what's the cost/risk of multiple Data.fs files and mount points), hmmm? 2. makes it easy to move a single client site between instances and servers (we don't yet know how load is going to mount up, and whether we'll need to set up a new server at, say, 30 sites, or 100, or ...) 3. site import/export doesn't work as well, and it seems that import/export of large Zope objects is deprecated... 4. I'm told that, occasionally, Data.fs become corrupted. We have some protection if that happens, since it should (I'd think) affect only one client, not many. I'm very interested in answers to #1 (things that will make me regret our current strategy) Chris Withers wrote: Christoph Berendes wrote: I am writing to tap the list's experience with running a single zope instance with a large number (30, 500, 2000?) of mount points. Why do you want so many ;-) We're hosting a number of client sites, and for each client, e.g. clientX, we have a mount point: zodb_db clientX mount-point /clientX filestorage path $INSTANCE/var/clientX/Data.fs /filestorage /zodb_db Why not just keep them all in the same .fs file? cheers, Chris ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Render a string as tal
Mark Gibson wrote at 2005-11-14 13:19 -0700: I would like to be able to render an arbitrary string as tal, having the tal statements evaluated correctly. How would I go about doing this? You create a Products.PageTemplates.ZopePageTemplate.ZopePageTemplate with the string as text, put it into the acquisition context by a call to its __of__(context) method (this defines 'here', 'container', 'request', ...) and then call it. You can do this in trusted code only... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] filename splitter
Peter Bengtsson wrote at 2005-11-15 11:47 +: Hi, I don't usually do this but I need your advise on something. It's a filename splitter for a KeywordIndex of File objects. http://www.peterbe.com/plog/filename-splitter By applying this splitter I hope to be able to search for files by parts of the filename. Are you aware, that the PathIndex can do this already -- especially the Managable PathIndex from my ManagableIndex product http://www.dieter.handshake.de/pyprojects/zope -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Apache-pound-zeo-zope instances. Bad gateway and dual cpus related issues
Christophe Gravier wrote at 2005-11-14 18:35 +0100: ... There 2 things that troubles my understanding: A) RewriteRule: http://machineA.mondomain.com as well as http://machineA.mondomain.com/Portail (where /Portail is the path to plone site in fact), both replies: Bad Gateway The proxy server received an invalid response from an upstream server. Such problems are best analysed with a TCP logger. My favorite one is Shane's tcpwatch. Others seem to like Etherreal for this purpose... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Setting a session's domain
Pablo Ziliani wrote at 2005-11-15 10:15 -0300: I'm developing a site that has multiple subdomains (i.e.: http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody point me how can I get the session to be shared across these different subdomains? Unless someone can give me an opposite advise, I think I need to specify a domain to the cookie which is trivial for regular cookies but I just can't find how to do it with sessions (notice that I am I'm using Zope's regular request.SESSION). The Browser Id Manager (browser_id_manager in your Zope Root Folder) is responsible for the session cookies. It has a configuration option to choose the cookie domain. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZClass in 2.8.4 - error help
Jake wrote at 2005-11-12 12:35 -0500: I am trying to get an old, old product to work in 2.8.4 and I am getting the following error: ... Module Zope2.App.ClassFactory, line 29, in ClassFactory Module OFS.Uninstalled, line 61, in Broken File string, line 1 class class 'ZDTopic_ZPropertySheetsClass'(BrokenClass): ' '; __module__=None ^ SyntaxError: invalid syntax Looks as if your class contains some feature no longer supported by Python. I would attack this problem as follows: * identify the problematic feature (by extracting the string above which exhibits the SyntaxError * find a new way how to spell this * fix the storage file by means of a text editor (be careful!: operate on a copy; ensure that the total size does not change. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] still having problems
Dennis Allison wrote at 2005-11-14 18:21 -0800: ... 2005-11-14T06:20:40 ERROR txn.4100 Error in tpc_abort() on manager MultiObjectResourceAdapter for Products.ZMySQLDA.db.DB instance at 0x42c6a52c at 1186514860 Traceback (most recent call last): File /usr/local/src/zope/Zope2.8/lib/python/transaction/_transaction.py, line 462, in _cleanup rm.tpc_abort(self) File /usr/local/src/zope/Zope2.8/lib/python/transaction/_transaction.py, line 548, in tpc_abort self.manager.tpc_abort(txn) File /usr/local/src/zope/Zope2.8/lib/python/Shared/DC/ZRDB/TM.py, line 64, in abort try: self._abort() File /opt/zope/zproducts/standard/ZMySQLDA/db.py, line 389, in _abort self._tlock.release() error: release unlocked lock Thus, you find all places where _tlock is acquired or released and analyse what can cause a _tlock release without a previous _tlock acquire... It looks like a bug in ZMySQLDA/db.py, maybe caused by an unexpected sequence of TM (Transaction Monitor) calls. Questions: ~~ What is the cause of the locking problem? Does ZMySQLDA/MySQL-Python/Zope have some path which should have called begin to get a lock and did not? Probably... What needs to be done to make session variables stable? You are aware that any exception that bubbles up to the ZPublisher (especially raise Redirects, Unauthorized, ...) will abort the transaction -- the session will not be modified ? Furthermore, sessions are inherently prone to potential race conditions. Are you sure that the problem arises from serial cases? Does the Temporary Storage method need to be extended to allow for rolling back a transaction? All ZODB storages are fully transactional... There is no switch to turn it on and off; it is always on. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Problems using forms to upload files to Zope
I don't know why getContentType() doesn't exist anymore?! a quick'dir' of a file instance attributes yields: ['close', 'filename', 'fileno', 'flush', 'headers', 'isatty', 'read', 'readinto', 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write', 'writelines', 'xreadlines'] Anybody out there know what happened to 'getContentType'? However, there is always a work around: REQUEST['fname'].headers['Content-Type'] should get you what you want. Jonathan - Original Message - From: Mike Jakowlew To: zope@zope.org Sent: Tuesday, November 15, 2005 1:19 PM Subject: [Zope] Re: Problems using forms to upload files to Zope Okay I corrected:form action="" method="post" enctype="multipart/form-data"and also tried the getContentType, but I get the error:Error Type: AttributeErrorError Value: FileUpload instance has no attribute 'getContentType'uploadForm.pydef content_type(self): return self.getContentType()def writeDB(): # get sql method insert=container['insert_fileapps'] REQUEST=context.REQUEST department = REQUEST.form.get('department') title = REQUEST.form.get ('title') filename = REQUEST.form.get('upload_filename') upload_contents= content_type(filename) if content_type.find('image')!=-1: context.manage_addImage(id, file, title) else: context.manage_addFile(id, file, title) return 'Finished' version = REQUEST.form.get('version') url = ""> ownerapp = REQUEST.form.get('ownerapp') isoapp = REQUEST.form.get('isoapp') comments = REQUEST.form.get('comments') date = REQUEST.form.get('date') filename=id filename = filename.split('\\')[-1] # call it, passing arguments insert( department=department, title=title, filename=filename, version=version, url="" ownerapp=ownerapp, isoapp=isoapp, comments=comments, date=date) # return a confirmation page page=container['thanks.html '] return page()writeDB() On 11/15/05, Mike Jakowlew [EMAIL PROTECTED] wrote: Here's what I'm trying to accomplish:1. The user fills out a form page with various fields 2. The user selects a file to upload3. when the user hits submit two things should happen: - The file selected is uploaded - all the filled out form fields are written to the database (MS SQL)This is my current problem:The writting to the database part works fine on it's own, but when combined with the file upload I get this error Error Type: AttributeErrorError Value: 'NoneType' object has no attribute 'headers'My code:*HTML FORM**htmlh1 tal:content="template/title"title/h1 pFill out the form below to update the website with the appropriate info:/pform action=""table width="100%" border="0" cellspacing="0" cellpadding="0" tr td width="16%" height="27" align="right"strongYour Dept: /strong/td td width="84%"input type="text" name="department"/td /tr tr td height="27" align="right"strongDocument Title:/strong/td tdinput type="text" name="title"/td /tr tr td height="30" align="right"strongFilename:/strong/td tdinput type="file" name="upload_filename" /td /tr tr td height="28" align="right"strongVersion of File :/strong/td tdinput type="text" name="version"/td /tr tr td height="28" align="right"strongURL:/strong/td tdinput type="text" name="url"/td /tr tr td height="33" align="right"strongOwner Approved:/strong/td tdinput type="text" name="ownerapp"/td /tr tr td align="right"strongISO Approved:/strong/td tdinput type="text" name="isoapp"/td /tr tr td height="41" align="right"strongComments: /strong/td td rowspan="2"textarea name="comments" cols="60" rows="5" /textarea/td /tr tr td height="85" align="right" valign="top"nbsp;/td /tr tr td height="29" align="right"strongDate/strong/td tdinput type="text" name="date"/td /tr tr td height="62" align="right"/td tdp input type="submit" id="submit" name="submit" / /p /td /tr/tablep/formhrpReturn to the a href=""News page/a/p/html ___Zope maillist - Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announcehttp://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] filename splitter
Am Dienstag, den 15.11.2005, 19:26 +0100 schrieb Dieter Maurer: Peter Bengtsson wrote at 2005-11-15 11:47 +: Hi, I don't usually do this but I need your advise on something. It's a filename splitter for a KeywordIndex of File objects. http://www.peterbe.com/plog/filename-splitter By applying this splitter I hope to be able to search for files by parts of the filename. Are you aware, that the PathIndex can do this already -- especially the Managable PathIndex from my ManagableIndex product http://www.dieter.handshake.de/pyprojects/zope According to your documentation, it could be done with ManageableIndex, but PathIndex isnt yet there. Peter splits in the name, not just the path. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope 2.8.4 compilation error
Hi, I am having the following error when compiling Zope: --- /usr/bin/python /infra/portal/Zope-2.8.4-final/setup.py \ build --build-base=/infra/portal/Zope-2.8.4-final/build-base/python-2.3 --build-lib=/infra/portal/Zope-2.8.4-final/build-base/python-2.3/build-lib --build-scripts=/infra/portal/Zope-2.8.4-final/build-base/python-2.3/build-scripts --build-temp=/infra/portal/Zope-2.8.4-final/build-base/python-2.3/build-temp running build running build_py running build_ext building 'AccessControl.cAccessControl' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -IExtensionClass -IAcquisition -I/usr/include/python2.3 -c AccessControl/cAccessControl.c -o /infra/portal/Zope-2.8.4-final/build-base/python-2.3/build-temp/AccessControl/cAccessControl.o En el fichero incluído de /usr/lib/gcc-lib/i486-linux/3.3.5/include/syslimits.h:7, de /usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h:11, de /usr/include/python2.3/Python.h:19, de ExtensionClass/ExtensionClass.h:83, de AccessControl/cAccessControl.c:51: /usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h:122:75: limits.h: No existe el fichero o el directorio En el fichero incluído de ExtensionClass/ExtensionClass.h:83, de AccessControl/cAccessControl.c:51: /usr/include/python2.3/Python.h:28:19: stdio.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:30:5: #error Python.h requires that stdio.h define NULL. /usr/include/python2.3/Python.h:33:20: string.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:34:19: errno.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:36:20: stdlib.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:39:20: unistd.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:46:20: assert.h: No existe el fichero o el directorio ... ... and the error list goes on. --- but the limits.h file does exist at the above mentioned location My environment is: Debian 3.1 (stable) dpkg -l | grep python ii python 2.3.5-2An interactive high-level object-oriented la ii python-ldap2.0.4-1A LDAP interface module for Python. [dummy p ii python2.3 2.3.5-3An interactive high-level object-oriented la ii python2.3-dev 2.3.5-3Header files and a static library for Python ii python2.3-ldap 2.0.4-1A LDAP interface module for Python 2.3 dpkg -l | grep gcc ii gcc3.3.5-3The GNU C compiler ii gcc-3.33.3.5-13 The GNU C compiler ii gcc-3.3-base 3.3.5-13 The GNU Compiler Collection (base package) ii libgcc13.4.3-13 GCC support library dpkg -l | grep make ii ant1.6.2-2Java based build tool like make ii libant1.6-java 1.6.2-2.1 Java based build tool like make -- library ii make 3.80-9 The GNU version of the make utility. ii makedev2.3.1-77 creates device files in /dev Any ideas what can be missing from my installation? Best regards, Gustavo. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Setting a session's domain
Dieter Maurer wrote: Pablo Ziliani wrote at 2005-11-15 10:15 -0300: I'm developing a site that has multiple subdomains (i.e.: http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody point me how can I get the session to be shared across these different subdomains? Unless someone can give me an opposite advise, I think I need to specify a domain to the cookie which is trivial for regular cookies but I just can't find how to do it with sessions (notice that I am I'm using Zope's regular request.SESSION). The Browser Id Manager (browser_id_manager in your Zope Root Folder) is responsible for the session cookies. It has a configuration option to choose the cookie domain. YES! that's the one I was looking for (I can't believe that I haven't seen it before). Thanks a lot Dieter, Pablo ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] conflicts, sessions, and programming best practices guidelines
Has anyone prepared a set of best practice guidelines on the techniques to use to minimize conflicts? It is becoming clear that we need to do to refactor some of our code to get us out of our current conflict pickle. A quick google produced lots of commentary but nothing I could hand to our programmers as guidelines. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Re: zope 2.8.4 on windows 98
I've From: Andreas Jung [mailto:[EMAIL PROTECTED] --On 15. November 2005 11:09:08 + Chris Withers [EMAIL PROTECTED] wrote: Fernando Martins wrote: File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\WinSignalHandler.py, lin e 84, in createEventSecurityObject sidEveryone.Initialize(ntsecuritycon.SECURITY_WORLD_SID_AUTHORITY,1) pywintypes.error: (120, 'InitializeSid', 'This function is only valid in Win32 m ode.') Andreas, was your testing with a 2.8.4-based system? I remember reading about the work that Mark Hammond did to make things better for Zope on Windows, but it looks like this might have spelled the end for Zope working on Win98 ;-) I think we are using 2.8.1 (we are using our own Zope version which is always tied to the normale release schedule). I've tried all versions from 2.8.1 and I always get the same error. I don't have MSVC to try the tarball install. I wonder if there is some detection code which is wrongly assuming I'm running an NT kernel. Maybe it's something in my system which is misleading zope. Is it simple to do a debug/stepping over zope to see what's going on? I've only used Boa Constructor a bit (hmm, I suppose threads are only started by the end of initialization). Fernando ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2.8.4 compilation error
Gusti Gonzalez wrote: Hi, I am having the following error when compiling Zope: --- /usr/bin/python /infra/portal/Zope-2.8.4-final/setup.py \ build --build-base=/infra/portal/Zope-2.8.4-final/build-base/python-2.3 --build-lib=/infra/portal/Zope-2.8.4-final/build-base/python-2.3/build-lib --build-scripts=/infra/portal/Zope-2.8.4-final/build-base/python-2.3/build-scripts --build-temp=/infra/portal/Zope-2.8.4-final/build-base/python-2.3/build-temp running build running build_py running build_ext building 'AccessControl.cAccessControl' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -IExtensionClass -IAcquisition -I/usr/include/python2.3 -c AccessControl/cAccessControl.c -o /infra/portal/Zope-2.8.4-final/build-base/python-2.3/build-temp/AccessControl/cAccessControl.o En el fichero incluído de /usr/lib/gcc-lib/i486-linux/3.3.5/include/syslimits.h:7, de /usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h:11, de /usr/include/python2.3/Python.h:19, de ExtensionClass/ExtensionClass.h:83, de AccessControl/cAccessControl.c:51: /usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h:122:75: limits.h: No existe el fichero o el directorio En el fichero incluído de ExtensionClass/ExtensionClass.h:83, de AccessControl/cAccessControl.c:51: /usr/include/python2.3/Python.h:28:19: stdio.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:30:5: #error Python.h requires that stdio.h define NULL. /usr/include/python2.3/Python.h:33:20: string.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:34:19: errno.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:36:20: stdlib.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:39:20: unistd.h: No existe el fichero o el directorio /usr/include/python2.3/Python.h:46:20: assert.h: No existe el fichero o el directorio ... ... and the error list goes on. --- but the limits.h file does exist at the above mentioned location My environment is: Debian 3.1 (stable) dpkg -l | grep python ii python 2.3.5-2An interactive high-level object-oriented la ii python-ldap2.0.4-1A LDAP interface module for Python. [dummy p ii python2.3 2.3.5-3An interactive high-level object-oriented la ii python2.3-dev 2.3.5-3Header files and a static library for Python ii python2.3-ldap 2.0.4-1A LDAP interface module for Python 2.3 dpkg -l | grep gcc ii gcc3.3.5-3The GNU C compiler ii gcc-3.33.3.5-13 The GNU C compiler ii gcc-3.3-base 3.3.5-13 The GNU Compiler Collection (base package) ii libgcc13.4.3-13 GCC support library dpkg -l | grep make ii ant1.6.2-2Java based build tool like make ii libant1.6-java 1.6.2-2.1 Java based build tool like make -- library ii make 3.80-9 The GNU version of the make utility. ii makedev2.3.1-77 creates device files in /dev Any ideas what can be missing from my installation? Best regards, Gustavo. Gustavo, Did you download the full (developers) version of python from python.org? If not you'll need to to compile Zope. David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] conflicts, sessions, and programming best practices guidelines
I don't know of any documentation but (correct me if I'm wrong) but - install zope 2.8.0 or something higher that uses zodb 3.4 - use zeo's and load balancers so that certain requests don't clog your pipes On 11/15/05, Dennis Allison [EMAIL PROTECTED] wrote: Has anyone prepared a set of best practice guidelines on the techniques to use to minimize conflicts? It is becoming clear that we need to do to refactor some of our code to get us out of our current conflict pickle. A quick google produced lots of commentary but nothing I could hand to our programmers as guidelines. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] conflicts, sessions, and programming best practices guidelines
On Nov 15, 2005, at 5:54 PM, Dennis Allison wrote: Has anyone prepared a set of best practice guidelines on the techniques to use to minimize conflicts? It is becoming clear that we need to do to refactor some of our code to get us out of our current conflict pickle. A quick google produced lots of commentary but nothing I could hand to our programmers as guidelines. Nothing in general except the (probably too general) attempt not to allow one process/thread to write to the same object at the same time as another process/thread. One tip, since you've told us you use sessions heavily: using ZEO to back your session database provides more opportunity for conflicts than if you used a normal Zope storage. This is because: - the opportunity for conflict naturally grows as transaction time increases and using a ZEO storage rather than a local storage adds latency to the total transaction time that would not otherwise exist. - you have n processes attempting to write to essentially the same objects at the same time when you use a shared ZEO sessioning database. If these were instead local databases, each process would only compete with itself (between all of its threads). I tend to try to use local sessioning databases backed by tempstorage plus a frontend load balancer that allows for cookie-based session affinity (Pound). - C ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] conflicts, sessions, and programming best practices guidelines
Peter, That's pretty much what we've done, but it is not really enough in our case. Our sites are interactive with lots of per user state. We make fairly heavy use of session variables to track the state. Our number of simultaneous users is also fairly high. In addition, during development, we structured things for ease of development rather than for mimimum liklihood of conflict errors. At this point we are seeing many conflicts and interactions with both the sessioning mechanism and the persistence mechanism--or so it appears. Even when we resolve the current database interaction problem, a refactoring seems in order to ensure the number of conflicts is kept to a minimum. On Tue, 15 Nov 2005, Peter Bengtsson wrote: I don't know of any documentation but (correct me if I'm wrong) but - install zope 2.8.0 or something higher that uses zodb 3.4 - use zeo's and load balancers so that certain requests don't clog your pipes On 11/15/05, Dennis Allison [EMAIL PROTECTED] wrote: Has anyone prepared a set of best practice guidelines on the techniques to use to minimize conflicts? It is becoming clear that we need to do to refactor some of our code to get us out of our current conflict pickle. A quick google produced lots of commentary but nothing I could hand to our programmers as guidelines. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com -- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Render a string as tal
On Mon, 2005-11-14 at 13:38, Paul Winkler wrote: On Mon, Nov 14, 2005 at 01:19:18PM -0700, Mark Gibson wrote: I would like to be able to render an arbitrary string as tal, having the tal statements evaluated correctly. How would I go about doing this? I assume you mean TALES expressions. See: http://zopelabs.com/cookbook/1037762730 Thanks for your suggestion. This has shed some light on the subject. However, what I'm looking for is being able to take a string such as 'div tal:content=here/absolute_urlThe url/div' and be able to evaluate the TALES expression in the string to produced something like: 'divhttp://mydomain.com/theUrl/div' Any chance there's a recipe for this? -- Mark Gibson [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Render a string as tal
On Tue, Nov 15, 2005 at 06:20:39PM -0700, Mark Gibson wrote: On Mon, 2005-11-14 at 13:38, Paul Winkler wrote: On Mon, Nov 14, 2005 at 01:19:18PM -0700, Mark Gibson wrote: I would like to be able to render an arbitrary string as tal, having the tal statements evaluated correctly. How would I go about doing this? I assume you mean TALES expressions. See: http://zopelabs.com/cookbook/1037762730 Thanks for your suggestion. This has shed some light on the subject. However, what I'm looking for is being able to take a string such as 'div tal:content=here/absolute_urlThe url/div' and be able to evaluate the TALES expression in the string to produced something like: 'divhttp://mydomain.com/theUrl/div' Any chance there's a recipe for this? Hmm. If you want TAL statements and all, I suspect you'll have to do as Chris suggested and instantiate a full-blown page template on the fly. I've never done that, if I were going to try I'd probably just start looking at the code in lib/python/Products/PageTemplates. You might be able to instantiate a PageTemplate rather than a ZopePageTemplate, which would be somewhat lighter as it leaves out a lot of stuff you surely don't care about (FTP support, ZMI management tabs, etc). -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )