Re: [Zope] Charset
Am Montag, den 02.05.2005, 09:43 +0200 schrieb [EMAIL PROTECTED]: Hello everybody, I change the file manage.dtml in ..\python\app\dtml. This is the change I've done: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN http://www.w3.org/TR/REC-html40/loose.dtd; html head meta http-equiv=content-type content=text/html;charset=utf-8 / titleZope on dtml-BASE0;/title Yes, thats a common problem - true HTTP-headers always override these meta headers. Unfortunately file based approach leaves you and most tools with the meta tags to transport encoding accross different file based tools. In Zope you should simply: dtml-call expr=RESPONSE.setHeader('content-type','text/html; charset=utf-8') somewhere in the header and probably skipp the meta tag (or have it at least the same content) 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] Charset
Am Donnerstag, den 28.04.2005, 15:48 +0200 schrieb Daniel Dekany: Thursday, April 28, 2005, 3:11:01 PM, Peter Eis wrote: [EMAIL PROTECTED] wrote: Hello the list, In Zope.conf ( ZOPE 2.7.5-final ) I changed rest-input-encoding and rest-output-encoding to send UTF-8 and then restarted the server. But in my webbrowser, the files are always received in windows-1252. Do you access zope directly or are you running behind a web server like apache? In the latter you'll have to change the default encoding in the apache config, too. Out of curiosity: How is that? I would think that Zope creates the whole HTTP response (so including the Content-Type: text/html;charset=utf-8 header). OK, mod proxy and such may change some headers in it, but the Content-Type's charset? The charset is about the HTTP response body, which is surely created inside Zope. Yes. Its entirely Zopes job. And if you are using pure Zope, you need to set the header in the publish process, e.g. with a python script or something you use for default display. Also you need to set a property manage_page_charset in zopes root to be able to use that encoding in ZMI too. This way you arent storing unicode - only utf-8 as you want to display it. Regards Tino -- Tino Wildenhain [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] ZPsycopgDA dropping connections?
Hi, Am Mittwoch, den 20.04.2005, 15:23 +1000 schrieb Richard Jones: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Has anyone else seen ZPsycopgDA just lose its connection? I've got two ZEO clients set up to use it, and every now and then one of them (the primary) just up and loses its connection. There doesn't appear to be any message in the log file *except* for the message saying that the connection's not active: I remember there was a thread in the mailinglist about the new version of ZPsycopgDA not automatically reconnecting after loosing connection. So instead of the previous versions you now see the fact the connections are dropped. The reason for dropping the connection in the first place often lay in the inproper configuration of a intermediate firewall (see tcp session timeout there) Regards 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] Subfolders of Extensions folder
Am Freitag, den 15.04.2005, 13:40 +0300 schrieb Vital Lobachevsky: Hi, all! Can I use the folders in Zope's Extensions folder to keep the External Methods in more logical way? iirc you can just create a directory in Products and put your methods there. You can then import it from here. try with or without __init__.py in that directory (can be empty) and Products.yourproduct.yourmodule as module name. ___ 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: Subfolders of Extensions folder
Am Freitag, den 15.04.2005, 10:41 -0400 schrieb Tres Seaver: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tino Wildenhain wrote: Am Freitag, den 15.04.2005, 13:40 +0300 schrieb Vital Lobachevsky: Hi, all! Can I use the folders in Zope's Extensions folder to keep the External Methods in more logical way? iirc you can just create a directory in Products and put your methods there. You can then import it from here. try with or without __init__.py in that directory (can be empty) and Products.yourproduct.yourmodule I don't think the 'Products.' prefix should be there (at least, I never use it for standard products' EMs). Yes maybe. It was untested and to be fully explorated by the reader :-) Regards 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] DTML namespace problem (was: dtml-tree issue)
Hi, Am Montag, den 11.04.2005, 14:08 +0300 schrieb Vangelis Mihalopoulos: Andreas Jung wrote: You should *not* define classes inside PythonScripts. PythonScripts are stricted and don't provide the full functionality. Either use filesystem based code (Zope Product) or use simple Python datatypes as dictionaries in this case. An External Method behaves exactly the same. I have not yet involved in writting even the simpler Product and i will not do it now for such a trivial issue. I tried to return a dictionary, - return {'a':1, 'b':2, 'c':3} -- but it the DTML Doc fails with a KeyError. Use a dict and if you really need DTML... see the keyword mapping for dtml-with and dtml-in tags. If you want to return custom class objects into untrusted code (e.g. from external methods) you need to set security declarations on them - at least add the attribute: __allow_access_to_unprotected_subobjects=1 (from top of head - just grep -r zopes source for the actual name) 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-dev] SiteRoot and VHM
Am Donnerstag, den 07.04.2005, 01:45 +0200 schrieb Florent Guillaume: After spending an hour helping someone debug a site that had an hidden SiteRoot somewhere that prevented a virtual host monster from working, it was suggested to me that if there's a virtual host monster, it should take precedence (and deactivates) any further SiteRoot. I think it's a good idea. Better yet, it should just display a warning (and change its icon/title or so) to display the problem and let the user decide the action to take. Regards Tino ___ 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] how to store ZSQL query results in a python var
Am Donnerstag, den 07.04.2005, 04:10 -0700 schrieb prabuddha ray: from a newbie, i've this ZSQLmethod returning me a string only. how do i store it a var in my python script. eg., userlevel = container.getUserLevel(uname=user) when i print it using html_quote as : print (%s) % html_quote(userlevel) return printed output is : (lt;Shared.DC.ZRDB.Results.Results instance at 0x41dd966cgt;) please help. Well, ZSQL Methods always return result sets, never strings. The restult set is an object which works similar to a list with result objects, each result object having attributes which correspond to column names of your query. The result objects have a method dictionaries() which in fact return the data as regular list with dictionaries for the rows (easier to look at if you see their string representation) so what you probably want goes like this: result=container.getUserLevel(uname=user) if result: userlevel=result[0].userlevel else: userlevel=somedefault # or raise error or whatnot the if result: idiom handles the fact the query might not return any result. It is true however if you get at least one row. result[0] addresses the very first row of the result - which must exist in a non empty result set. 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] Set MIME type using ZPT
Am Dienstag, den 05.04.2005, 13:11 -0700 schrieb srikanth: Hi, I am using an external method to load an Image from the harddrive. The external method is as follows: from email.MIMEImage import MIMEImage ##parameters=filename def getDocument(filename): fname = '/mnt/'+filename; input = open(fname,'r') content = MIMEImage( input.read( ) ) input.close( ) return content When I try to display the content in the webpage what I actually got is all raw data of the file rather the image. So how can I convert the raw data to be dispalyed as image in the webpage. I am using ZPT to display the web page (image). If its dtml I could have used dtml-mime tag is there any equivalent to that in ZPT. This is not a domain for templating languages like DTML or ZPT. Images are read seperately by the client (get a sniffer like shanes tcpwatch or tcpflow and see whats going on there) So your external method has to set the headers. Unfortunalely you open a huge security hole with your solution and by not reading the python documentation carefully ;) fname = '/mnt/'+filename; --- if I put a filename like ../etc/passwd I start to have fun. Ah, and image data for web pages are raw. So you dont need mimeimage alltogether. Just open().read() Again, if you want performance, you should use: from ZPublisher.Iterators import filestream_iterator return filestream_iterator(filenameondisk,'rb') Regards 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] HTTPSConnection Python 2.3.4
Hi, Am Freitag, den 01.04.2005, 14:35 -0500 schrieb Paul Winkler: On Fri, Apr 01, 2005 at 08:29:39AM +0100, Chris Withers wrote: Paul Winkler wrote: I have a somewhat similar issue; an in-house Zope product is retrieving some information from a remote URL. If I hit the same URL from the command line on the zope server (using wget), it works fine. When Zope hits it, it gets a Bad Gateway error from the remote (Apache + Jboss) server. Will post back here with anything I find out, maybe it will help you. For both you and Jacob I'd recommend getting a packet sniffer up and running. It looks like the requests your python code is emitting are not the same as the ones that, for example, wget is emitting. It'd be a heck of a lot easier if the packets were unencrypted. I set up tcpwatch (great tool!) but predictably, for an SSL connection, the output is gibberish. Any other ideas? You might try http://www.rtfm.com/ssldump/ (also as package available for most systems) ___ 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-dev] getPassword() from PythonScript
Am Montag, den 27.12.2004, 14:30 +0100 schrieb Krzysztof Kubacki: Hi, Zope 2-7-0 Linux Is possible to get user's password by getPassword() method using Python Script? Any proxes don't work. the code below: user = context.getMemberById(context,'koperski') return user.getPassword() returns: The object is marked as private. Access to 'getPassword' of (MemberData at 0x2353aea0) denied. Well, you dont want anybody read your password. In fact modern userfolder implementations only save crypted (hashed) password so the function would be of no use anyway. If you want to help users who forgot passwords, offer a function to generate a new password. Regards Tino ___ 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-dev] Python2.4 and Zope 2.7
Hi, Am Mo, den 18.10.2004 schrieb Andreas Jung um 20:30: I have installed Zope 2.7.3 + Python 2.4b1 on my company site and it seems to run pretty fine. I could not see the error below you described. I can second that. python-2.4.0b1 as Andreas said. :-) Regards Tino ___ 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] xml-rpc changes between 2.7.0 and 2.7.3 ??
Hi, Am Di, den 12.10.2004 schrieb Alan Milligan um 0:16: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I had a client that used to work on 2.7.0, and now doesn't on 2.7.3. The problem would appear to be that it's not substituting the xmlrpc.Response class for a GET request on a text/xml content type and therefore just delegating to the str() function instead of wrapping it in the xml-rpc xml response tags. I'm a little confused about this, as this only appears to happen in HTTPRequest::processInputs which didn't seem to be invoked for my xml-rpc call anyway ... tcpdump follows for the sceptics ... j.. 08:05:04.901469 IP mistress.balclutha.org.34257 mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767 nop,nop,timestamp 225097763 225097723 [EMAIL PROTECTED]@.)..W.x... j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1 Host: localhost:8080 Accept-Encoding: identity x-client-version: 1 x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version 1.40) x-up2date-version: user-agent: rhn.rpclib.py/$Revision: 1.40 $ x-rhn-transport-capability: follow-redirects=1 x-rhn-auth-channels: ['mail', '1'] content-type: text/xml x-info: RPC Processor (C) Red Hat, Inc (version 1.44) Your log is a bit confusing maybe you better use tcpflow for dumping. But what is clearly seen is the GET request. I wonder how this ever was supposed to work since XML-RPC requires an entidy body for the message (which is in XML). You can compare with RFC2616 - there is no entidy body in GET. Your client needs to use POST. I suspect then it should work. Regards Tino ___ 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] xml-rpc changes between 2.7.0 and 2.7.3 ??
Hi, Am Mi, den 13.10.2004 schrieb Alan Milligan um 3:31: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tino Wildenhain wrote: | |I had a client that used to work on 2.7.0, and now doesn't on 2.7.3. | |The problem would appear to be that it's not substituting the |xmlrpc.Response class for a GET request on a text/xml content type and |therefore just delegating to the str() function instead of wrapping it |in the xml-rpc xml response tags. | | I wonder how this ever was supposed to work since | XML-RPC requires an entidy body for the message (which is | in XML). You can compare with RFC2616 - there is no | entidy body in GET. Your client needs to use POST. | I suspect then it should work. | Ok, I now more fully understand the subtlety of this explanation. What happened here is that in cgi.py's FieldStorage class, since this is a GET request, it completely ignores the CONTENT_TYPE environment and sets the content-type header to x-www-form-urlencoded. According to Dave Winer's spec at http://www.xmlrpc.com/spec, XML-RPC is supposed to be HTTP-POST based, where this issue is fully resolved. I have implemented this GET 'Extension' with this patch. I appreciate that supporting 'unofficial' extensions to protocols is not something we want to encourage, but is there any chance of getting this patch into zope core (ever)? -1 by me. Go and fix the broken client instead. I wonder who came to such a crazy idea to even think about sending a body with GET. Regards Tino ___ 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] ZPublisher timing hooks ?
Hi, Am Fr, den 08.10.2004 schrieb Simon Michael um 4:10: Hi all, I'd like to print a this page was rendered in ... milliseconds as you see on php sites. I think I'd get better accuracy by getting at least the start time from ZPublisher because.. actually it may not help, but I'm thinking about the case where a request generates a redirect and another request. I'd like to time the whole thing. Well, retry requests in case of a storage conflict. But redirects will actually cause two distinct requests you cannot join together. When you want to show the render time, a DateTime() at start and at end should suffice. I dont think you can get much better figures here. Regards Tino Do you know if there are any facilities for this already in ZPublisher ? Any tips or pointers welcome. -Simon ___ 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 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: inconsistent mimetype assignment for uploaded files
Hi, On Tue, 2004-10-05 at 12:11, Dominic Hiles wrote: Dear Tres, --On 04 October 2004 13:43 -0400 Tres Seaver [EMAIL PROTECTED] wrote: Dominic Hiles wrote: Sorry, I missed these susbequent follow-ups before posting a reply a few minutes ago! If we're going down this route, can we at least change things so that the guessing is done using ZServer.medusa.mime_type_table, rather than the default python mimetypes table? I would guess that the medusa version is more neglected than the Python one; is your experience otherwise? I now realise where my confusion came from. Python 2.1.3 had only 85 file extensions listed in mimetypes.types_map.keys() whereas ZServer.medus.mime_types_table showed 106 with Zope 2.6.4. However, Python 2.3.3 is now up to 117, so I guess it makes the better choice. Apologies for the noisethat said, I'm still unhappy that a browser can dictate the mimetype chosen for an uploaded file, but I'm happy enough to fix that at the application level. Well, the problem might be the asymptation part of the filename should be considered an indicator of its contents. Arent there any libs for python to examine the contents (usually the first few bytes) for the type of the file? Regards Tino ___ 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] using VirtualHostMonster in a ZPublisher python module?
Am So, den 19.09.2004 schrieb Royce um 23:55: ... The module is a full website. It started way back when as a Bobo app and I've never learned of a good way to bring it into managed zope land. It's remained a ZPublisher app. Believe me, I know I'm not mainstream with this. Would like to bring it mainstream but practically speaking have to do it a bit at a time. My URLs do not all start with a / -- some are relative to current location. Are you saying that if I change them all to be absolute paths for the site it will work? Not the greatest practice but I'm looking for practical solutions. Either you set the base tag yourself or you fix your relative links to starting with /. Both is a goot Idea for a zope app as well. Regards Tino Wildenhain ___ 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] using VirtualHostMonster in a ZPublisher python module?
Hi, Am So, den 19.09.2004 schrieb Royce um 19:27: Hi all, Can I somehow get a VirtualHostMonster inserted into a ZPublisher-based python module published through changes to z2.py? Am having problems with base href with apache proxying for this python module. Have scoured past discussions but haven't found an answer to this. I have two areas declared to zhttp_handler(): 1. /z -- standard managed zope area 2. /app -- my python module which is a ZPublisher-based app that doesn't have /manage or the other managed zope stuff For #2 I modified z2.py per Amos' write up: How to Publish Your Own Python Modules (http://www.zope.org/Members/Amos/ZPublisher) ... (thanks, Amos!). But I can't get the base href set properly for this. Changes to z2.py shown below. I really appreciate any light people can shed on this. Am willing to pay for help on this. Thanks! Royce p.s. alternately I could import the python module as an ExternalMethod but have had serious import problems when doing so. What is this module doing? The feature you use is rarely used by anyone. If you need the functionality of VHM there, I guess you have to write your own or hardcode URL references somehow. If you strictly use URLs relative to server root (that is, all starting with /) there is no problem. Regards Tino Wildenhain ___ 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] Suggestion for small(?) change in BaseRequest.py. Security effects?
On Thu, 2004-09-02 at 12:38, Lennart Regebro wrote: ... Then, suggestion: = My tests seems to show that inserting a return after the unauthorized call above: if user is None and roles != UNSPECIFIED_ROLES: response.unauthorized() return will solve this issue. It is now possible to NOT raise an exception in unauthorized and still not get problems. Instead, you can now to a RESPONSE.redirect(), or you can replace the body with setBody for a login form, or something like that. I haven't been able to find any other code that continues after an unathorized call, so this should be the only place. Also, during normal operation, it is obvuiosly a safe bet. The change in itself has no nasty side effects. I'd add a transaction rollback before return actually, which is the normal behavior when an exception is raised like Redirect or Unauthorized So if the situation is: user is anonymous or has insufficient rights on a object which is handled after some changes are made to objects, the challenge will take place and rolls back all these changes which should not have taken place for that user. so: if user is None and roles != UNSPECIFIED_ROLES: response.unauthorized() get_transaction().abort() return should do the trick. Regards Tino Wildenhain ___ 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] Pointless code in ZPublisher.HTTPRequest ?
Am Di, den 31.08.2004 schrieb Paul Winkler um 19:08: Can anyone enlighten me on what this is for? From ZPublisher.HTTPRequest.HTTPRequest.keys: ... ** btw, this too smells a bit funny to me... why bother to keep a separate data structure in sync, when we could just do: for i in range(9): try: del(self.other['URL%d' % i]) i += 1 are you sure about the increment here? except KeyError: break Regards Tino ___ 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] Protected session items?
Hi, Am Fr, den 27.08.2004 schrieb Lennart Regebro um 11:32: Lennart Regebro wrote: Another idea: Maybe I could make an object that does not have public access, and store that in the session? That seems to work! Here is the class: class ProtectedUsername: An object where the username is not accessible from user code. def _setUsername(self, username): self.__username = username def _getUsername(self): return self.__username Very simple indeed. It is impossible to define up a class that has methods that start with underscore from user code. and even other usercode classes seem not to be pickable (is that correct?) so even though you can replace the value of SESSION['__ac'] you can't replace it with any usercode object, and definitely not with anything that has a _getUsername() method. And, as additional security, when I use I check that it really is a ProtectedUsername object: if ob is not None and isinstance(ob, ProtectedUsername): username = ob._getUsername() This *should* mean, that as long as you don't allow usercode to import a ProtectedUsername object, it should be safe. In fact, you can't even figure out what the username is. ;) Even a traceback will not show this username anymore if its inside an object without __repr__ :-) Regards Tino ___ 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] New-style ExtensionClass
Dieter Maurer schrieb: Jim Fulton wrote at 2003-10-20 11:55 -0400: ... Speaking of Zope 2.8, Jeremy Hylton has suggested that, perhaps, Zope 2.8 should be a release that provides *only*: - New-style ExtensionClass, and - ZODB 3.3, featuring multi-version concurrency control, plus any features that have been added to the head since the Zope 2.7 branch was created. This idea is pretty appealing to me. I wonder what others think of it. +1 +10 Tino ___ 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] Auto password expiry based on time
Hi Exteam, 1.) do you have a real name too? 2.) you should not crosspost questions 3.) you should have a look at rfc2616 which describes how HTTP work. In short: you cant modify anything in Zope to let the browser expire the Basic-Authentication. Its just impossible to do this. To get closer to what you want, you need a cookie or path based authentication, for example using cookiecrumbler or ExUserFolder. Next thing you would do is to set a lifetime of the cookie maybe in the source of cookiecrumbler or ExUserFolder. Regards Tino Exteam wrote: Hi all, I have been trying to find a way to make the password to a zope site expire after a limited fixed time, unsuccesfully using python. I know I have to use acl_users but which file to modify in zope (which is used to log in the user)is the question. Also does this mean I have to recompile zope? Any help or direction would be highly appreciated. Regards Subhankar Yahoo! India Promos: Win TVs, Bikes, DVD players more! Go to http://in.promos.yahoo.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 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] DBTab/ZEO configuration in Zope2.7 beta1
Hi, looking thru code, examples and documentation, it seems DBTab is included into Zope2.7. Now how to configure it? Should I use a dbtab.conf file as it was with 2.6? The mkzopeclient.py with -z option just builts a custom_zodb.py which does not seem to be very 2.7-alike. Shouldn't that configuration not be in zope.conf? I cannot find relevant tags for the zodb_db tag. Are there any places I could look into for enlightement? Regards Tino Wildenhain ___ 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] DBTab/ZEO configuration in Zope2.7 beta1
Hi Chris, Chris McDonough wrote: mkzopeclient -z should go away. You should use the zope.conf file to configure mounted databases. Unfortunately I haven't had time to include adequate examples in the sample config, but it might help a bit to look at the lib/python/Zope/Startup/zopeschema.xml file. That was the second thing I did :-) (first was to look into doc/) I spottet the following directives: mount-point/ (Seems to be specifiable multiple times) connection-class/ class-factory/ ok, I can somehow stick ZEO.ClientStorage.ClientStorage into it, but what then? How to set options for ClientStorage? Hostname, Port, Cache, Fall-back-Storages (as supported by DBTab) I can provide the examples for the template once I have working ones... Regards Tino ___ 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] DBTab/ZEO configuration in Zope2.7 beta1
Just a step in between: I found ZODB/component.xml, where there seem to be the definition of the relevant section of zope.conf. zodb_db main zeo_client server localhost:12345 /zeo_client mount-point / cache-size 5000 pool-size 7 version-pool-size 3 version-cache-size 100 /zodb_db zodb_db images filestorage path $INSTANCE/var/Images.fs /filestorage mount-point /images ... /zodb_db zopectl debug yields the following: File Zope/lib/python/OFS/Application.py, line 349, in initialize tf._setObject('session_data', toc) AttributeError: _setObject strange. Perhaps the temp_folder isnt mounted? There is no reference of the tempstorage in the above definition file... Tino Wildenhain wrote: Hi Chris, Chris McDonough wrote: mkzopeclient -z should go away. You should use the zope.conf file to configure mounted databases. Unfortunately I haven't had time to include adequate examples in the sample config, but it might help a bit to look at the lib/python/Zope/Startup/zopeschema.xml file. That was the second thing I did :-) (first was to look into doc/) I spottet the following directives: mount-point/ (Seems to be specifiable multiple times) connection-class/ class-factory/ ok, I can somehow stick ZEO.ClientStorage.ClientStorage into it, but what then? How to set options for ClientStorage? Hostname, Port, Cache, Fall-back-Storages (as supported by DBTab) I can provide the examples for the template once I have working ones... Regards Tino ___ 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 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] DBTab/ZEO configuration in Zope2.7 beta1
Hi Chris, thank you. By the time I got it working when I first used filestorage, bootet zope so it created all folders as it wants and then stop zope and use that Data.fs for ZEO. Then I was able to mount the zeo as / I'll investigate this further and provide the examples. For now even the fallback seems to work. Storage type temporary seems to not mentioned anywhere, but I'll test this too. Kind regards Tino Wildenhain Chris McDonough wrote: This is because the default is to mount a temporary storage at /temp_folder. Since you overrode the default, you need to specify the tempfolder storage in the config. Something like this (untested) as an additional zodb_db entry should work: zodb_db temporary temporarystorage name sessions /temporarystorage mount-point /temp_folder /zodb_db On Fri, 2003-08-15 at 16:40, Tino Wildenhain wrote: Just a step in between: I found ZODB/component.xml, where there seem to be the definition of the relevant section of zope.conf. zodb_db main zeo_client server localhost:12345 /zeo_client mount-point / cache-size 5000 pool-size 7 version-pool-size 3 version-cache-size 100 /zodb_db zodb_db images filestorage path $INSTANCE/var/Images.fs /filestorage mount-point /images ... /zodb_db zopectl debug yields the following: File Zope/lib/python/OFS/Application.py, line 349, in initialize tf._setObject('session_data', toc) AttributeError: _setObject strange. Perhaps the temp_folder isnt mounted? There is no reference of the tempstorage in the above definition file... Tino Wildenhain wrote: Hi Chris, Chris McDonough wrote: mkzopeclient -z should go away. You should use the zope.conf file to configure mounted databases. Unfortunately I haven't had time to include adequate examples in the sample config, but it might help a bit to look at the lib/python/Zope/Startup/zopeschema.xml file. That was the second thing I did :-) (first was to look into doc/) I spottet the following directives: mount-point/ (Seems to be specifiable multiple times) connection-class/ class-factory/ ok, I can somehow stick ZEO.ClientStorage.ClientStorage into it, but what then? How to set options for ClientStorage? Hostname, Port, Cache, Fall-back-Storages (as supported by DBTab) I can provide the examples for the template once I have working ones... Regards Tino ___ 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 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 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 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: TALES idea: tuple unpacking
Shane Hathaway wrote: Philipp von Weitershausen wrote: I agree that it is 'yucky', but I have to disagree with your proposed solution. I would rather suggest making TALES aware of integer indexes for sequences. Example:: tal:block repeat=user_files here/listFilesByUser User: tal:dummy replace=user_files/0 / File: tal:dummy replace=user_files/1 / /tal:block Here's the way I'd like to spell it: div tal:repeat=user_files here/listFilesByUser User: span tal:replace=user_files/int:0 / File: span tal:replace=user_files/int:1 / /div Literally, user_files/int:0 says get item 0 of user_files, interpreting '0' as an integer. Technically, this could be interpreted as get the attribute named 0 or item 0, but an attribute name must be a string, so implicitly it really just says get item 0. We've come up with a number of generally useful prefixes, BTW. Off the top of my head: call: -- Call a named method int:-- Look up an item by index format: -- Perform simple formatting operations like format:money zope: -- Access a big Zope API It sure would be nice to have these prefixes, both in Zope 2 and Zope 3. Hm. But then would we not be better of using python: expressions in the first place? Seems to save a lot of typing. I'd better like to build up lazy complex objects with python scripts to pass to ZPT, I think this would make more sense. Imagine instead of returning lists of dictionaries with all precalculated values you return list of objects with real methods to calculate attributes on demand. (Yes, sounds like ZPatterns, but may be a more easy interface) Regards Tino ___ 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] Re: [Zope-dev] Zope Book call for assistance
Hi Chris, --On Freitag, 6. Dezember 2002 21:27 -0500 Chris McDonough [EMAIL PROTECTED] wrote: On Fri, 2002-12-06 at 19:13, Tino Wildenhain wrote: These are exactly the things you shouldn't neither do in DTML nor in ZPT :-) What do you suggest people use for a templating language for email, JavaScript, SQL, etc? I think it's too much to expect them to use Python to do this (esp. wrt SQL methods). Oh, is it? I'd rather like to write %(name)s %(value)d then dtml-whatever value Recently I read the python-dbi spec and its very nice to see what you could do with the above form. There are even standard ways to do multiple querys or function calls. (Hope I can contribute a product for this as time permits) For E-Mail and Javascript templates I also find it less confusing if I can use %(var)s form. As a general solution for texts one can use file which has an edit tab for several releases of zope now. Then use it like this: context.thefile.read() % context.REQUEST.form or whatever seems appropriate to get values from. E-Mail even gets clearer with the solution since you can easyly loop and do whatever instead of multiple dtml-sendmail tags. Regards Tino I'd start the lessons with ZPT to only show static content and may be macros. Then the logical order would be introduction to python scripts without HTML output - only show how they are used to calculate and output simple values, lists, dictionaries and so on. Next chapter should show how one uses the scripts with ZPT to provide output into HTML. Then the usual things like Catalog, ZSQL, important API parts, etc. Don't you think this would be clearer for the beginner? Sure. I'd love to rewrite the entirety of the Zope Book. But please notice that I'm asking for help finishing the existing chapters, so I don't think this is a realistic goal. - C ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope Book call for assistance
Hi, --On Donnerstag, 5. Dezember 2002 23:20 -0500 Chris McDonough [EMAIL PROTECTED] wrote: ... Advanced DTML: http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvDTML.stx erm... would advanced DTML not be the short sentence: avoid DTML where you can? ;) Btw. did you think of putting the whole DTML stuff at the end for reference only to help migrating old products and turn the whole thing a bit around so beginners get a clear path of Zope development? I found it a bit confusing when I edited the german translation of the 2.3 book a year ago. Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope] Re: [Zope-dev] Zope Book call for assistance
Hi Chris, --On Freitag, 6. Dezember 2002 09:50 -0500 Chris McDonough [EMAIL PROTECTED] wrote: erm... would advanced DTML not be the short sentence: avoid DTML where you can? ;) That'd be ok, except that DTML can of course do things that ZPT can't, yada yada yada. These are exactly the things you shouldn't neither do in DTML nor in ZPT :-) I'd start the lessons with ZPT to only show static content and may be macros. Then the logical order would be introduction to python scripts without HTML output - only show how they are used to calculate and output simple values, lists, dictionaries and so on. Next chapter should show how one uses the scripts with ZPT to provide output into HTML. Then the usual things like Catalog, ZSQL, important API parts, etc. Don't you think this would be clearer for the beginner? Regards Tino Btw. did you think of putting the whole DTML stuff at the end for reference only to help migrating old products and turn the whole thing a bit around so beginners get a clear path of Zope development? I found it a bit confusing when I edited the german translation of the 2.3 book a year ago. That's probably a good idea. But I think the rewritten chapters explain when to use ZPT and when to use DTML. And DTML still needs to be given some attention for the reason I say above... - C ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope] post-publishing hook
Hi Carlo, --On Freitag, 29. November 2002 13:07 +0100 Carlo Giomini [EMAIL PROTECTED] wrote: Dear all, I need a sort of post-publishing hook (so to say). I need Zope to call a function of mine as the very last action of publishing a request, i.e. after having built the response (and sent it to the browser possibly), but before starting publishing a new request. My Zope server is running as a single-threaded app. Does Zope support this any way? May be. But what are you trying to do? Perhaps there is a better solution available if we know the whole picture. Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Moving forward with Zope 2.7
Hi Jamie, --On Montag, 25. November 2002 22:29 -0800 Jamie Heilman [EMAIL PROTECTED] wrote: * where possible, the banishment of environment variables as configuration. I have to say, I think this is a bad idea. What is it about environment variables do you find worthy of banishment? I can tell you a few of the reason I really like them: a) Code spent garnering values is minimal, I don't have to worry about acres of code spent parsing yet another config file format or the inevitable quirks and bugs in that code. It doesn't get much simpler than os.environ.get() b) I have tools to examine runtime environments which are external to the zope application and any of its limitations. If I wanna know what a particular value is, I can just find out using ps. I don't have to dig around in the zmi, or rely on any custom clients to query that data from a running instance. c) Environment variables lend themselves to nicely to modification by third party tools; I can set environment variables in shell scripts, python scripts, whatever--the paradigm is language agnostic. In particular I'm rather fond of using daemontools and its envdir program in conjunction with a custom z2.py replacement that lets me take advtanage of the excelent supervision and logging infrastucture provided by daemontools. Force me to use an external config file and its going to make this kind of thing more difficult to do. Oh, while we are at it - how do I set an environment variable in a python script for use outside the script? E.g. like export does in shell scripts? Regards TIno That said I know they aren't an end-all solution for all configuration needs, but just because they don't fit every need I don't see why they should be completely discounted. -- Jamie Heilman http://audible.transient.net/~jamie/ You came all this way, without saying squat, and now you're trying to tell me a '56 Chevy can beat a '47 Buick in a dead quarter mile? I liked you better when you weren't saying squat kid. -Buddy ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Moving forward with Zope 2.7
Hi, --On Dienstag, 26. November 2002 09:18 -0500 Chris McDonough [EMAIL PROTECTED] wrote: On Tue, 2002-11-26 at 05:22, Tino Wildenhain wrote: Oh, while we are at it - how do I set an environment variable in a python script for use outside the script? E.g. like export does in shell scripts? Not from a Zope Python Script (it's restricted by the security machinery) but from any other piece of Python: import os os.environ['NAME] = 'VALUE' Tried it: os.environ['MYENVIRON']='FooBar' ^D echo $MYENVIRON nothing. What is wrong? Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] access of non html documents
Hi Roberto, One solution is to provide a temporary identifyer via cookie, which gets set if the user sees your page but is not set if she wants to download it directly. A simple non guessable scrable mechanism using your page url, file url and probably ip of the downloader should do for the cookie value. File objects can have a precondition which refers to a method where you can evaluate the cookie and serve the file or refuse access (via raise Redirect,url) I would not recommend to use HTTP_REFERRER for this, because this is by no way relieable. Regards Tino --On Dienstag, 12. November 2002 16:11 -0800 General Info [EMAIL PROTECTED] wrote: i have the following situation. i want the users to be able to download non html documents if that document is refered to from an html document. however, i dont want the users to be able to type the url and document name on the url box of their browers and be able to download it. for example: the documents exist in http://www.wwwdotcom.com/nonhtmldocs/doc1.pdf however, i dont want the users to type that url on their browser and access doc1.pdf i only want them to access it if that particular document is linked from an html document. i have seen some websites that do that w/ images. how can i do that on zope? is it possible? i would appreciate any comments/suggesstions. -roberto ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] acessing raw header information?
Hi Holger, ... snip ... My next try will be to get my configuration to sent authorization headers along the first request. This sometimes happens but i have no idea what the rules are. but thanks for all the answers anyway! Did you think about authorization with cookies? Perhaps cookies are send with your javascript construct? Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope] WISH LIST - idea of new, DTMLRelation object
Hi Jaroslav, perhaps you want to use dtml-with rootfolder ...navigation.. /dtml-with ? Rootfolder could be the object you want to be the root (of course) or in case of ZopeRoot, you get it via REQUEST.PARENT[0] However, before beating the dead horse, you should consider replacing your routine with a python script, which could also use ZCatalog in place of ObjectValues() - this saves Memory and time since not all Objects have to be activated. This approach would also help you to go the way from DTML to ZPT which is recommended. Greetings Tino For your --On Mittwoch, 9. Oktober 2002 08:35 +0200 Jaroslav Lukesh [EMAIL PROTECTED] wrote: Hi all, I have an idea of new Zope DTML object with specific things. Dear Zope developers, please take attention to following lines: Imagine folder structure as / /folder1 DTMLMethod DTMLDocument DTMLRelation image.gif /folder11 /folder111 /folder112 /folder12 /folder2 /folder21 All three DTML* contains same code: dtml-in objectValues('Folder') dtml-var idbr /dtml-in img scr=dtml-var absolute_URL/image.gif Imagine what is doing that DTML Document or DTML Method are called from inside of /folder11. DTML Document make bad, but still functional (due acquisition) link to image. But DTML Relation will still give that same output, independent from where you call it: folder11 folder12 img src=http://domain/folder1/image.gif; Output is still independend from where you calling that DTMLRelation and give you right URL paths (relative or basolute). I think that DTML Relation (or you can call it better) should be very usefull, for example: 1. for navigation structure when you want to have constant navigation buttons what are dynamically generated from folder structure that have strong changes in any folder names 2. for image menus, where it give right path to images folder instead of acquired images etc. (I now, you can specify path with dtml-var BASE1/images/image.gif) Many thanks for your kindly attention. If it have simple solution by standard DTML code, let me know that code, please. Best Regards J. Lukesh ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Unicode Diffs
Hi Kent, I'd like to compare your patches with the ones I currently implemented on my private branch. I tried to use the default settings in site.py. Unfortunately this requires changes in the local installation of python. (Dont know why the hell this does not make use of locales) Regards Tino --On Mittwoch, 25. September 2002 13:26 -0400 Matthew T. Kromer [EMAIL PROTECTED] wrote: kent sin wrote: I have a quick hack of Zope to use utf-8 as default encoding. This will allow all languages co-exist, making a heaven for different language users. Also, this help to easy Zope 2.6 for non latin users. I did not test this very throughly, but it seems not broken any thing yet. Please consider seriously make this into zope 2.6. I know this is very late, but the current 2.6 is very bad to non-latin users. Rgs, Kent Sin Please take a look at the proposals on dev.zope.org, and file this idea as a proposal. In this way we can evaluate the solution with regards to the problem and the implementation. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] A modest proposal: Replace medusa with Twisted
Hi Itamar, this sounds good for me. One would have to see it in the wild. Would you be able to do a sample integration for testing? At the same time unmeshing the publishing process sounds sexy to me... Regards Tino --On Mittwoch, 10. Oktober 2001 12:11 +0200 Itamar Shtull-Trauring [EMAIL PROTECTED] wrote: Actually, this brings up this idea I had - Zope should replace medusa with Twisted. Why, you ask? 1) Twisted separates transport from protocols, and the event loop it uses is extendable and generic. That means: - It can run on Jython (using threads, someday with java.nio), and it can be integrated with the Tk and GTK event loops. - Your protocol doesn't have to worry about the transport - Twisted supports SSL, TCP and unix domain sockets right now, without having to make any change to the protocols. 2) Twisted is designed to run multiple servers and protocols at the same time, and these can be changed at runtime. It already includes pure python support for HTTP, FTP, LDAP, SMTP, POP3, DNS, telnet, AIM TOC, and IRC, all integrated with the main event loop (all have server support except DNS and LDAP). Adding new protocols to Zope is not easy, at the moment. 3) Twisted is being actively developed and extended. medusa less so. 4) Good integration with threads - while event based, twisted has a very nice model for dealing with threaded apps. 5) Twisted has Perspective Broker, an async.ready remote-object protocol that supports caching, object migration, and remote messaging, with integrated authentication and authorization. And it ideologically meshes with the object publisher notion in Zope. No, really :) Twisted already includes a high-level web framework, but Zope probably would not use it, and instead build its own on top of twisted's low-level http support. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalog bloat problem (berkeleydb is a solution?))
Hi, --On Mittwoch, 27. Juni 2001 15:54 -0500 Stephan Richter [EMAIL PROTECTED] wrote: At 10:45 PM 6/27/01 +0200, Erik Enge wrote: On Wed, 27 Jun 2001, Tino Wildenhain wrote: if there are always many objects to create, may be it would be better to have a generic mechanism for asking users and represent app-/management interfaces rather then copying all the stuff over and over? That's what mk-zprod does. Or rather, will do once I've made the interface friendlier. (If I didn't misunderstand you.) If I have some time left at all tonight, I will make a wizard that could be the initial front-end to mk-zprod. Could you give me a short list of things you would like to ask the user? Hm. a simple collection of questions? Certainly not. I talking of a whole mechanism, where you group input and output into contexts. From application view it would be an API, it schould work no matter if the input/ output is generated from and to HTML, WML, XML or even stand-allone GUIs. I'm thinking of semantic groups of input, output and types and ranges and default values including naming conventions. Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalog bloat problem (berkeleydb is a solution?))
Hm. Wizard? if there are always many objects to create, may be it would be better to have a generic mechanism for asking users and represent app-/management interfaces rather then copying all the stuff over and over? Regards Tino --On Mittwoch, 27. Juni 2001 08:54 -0500 Stephan Richter [EMAIL PROTECTED] wrote: So what does it do? :) It is a general Wizard Builder with which you could build a Wizard that asks for all the necessary information to auto-generate a Python Product (for example). What I'm thinking is this: maybe use SmartWizard to meta-program you Python Product; that creates a definition file(s) of some sort which is sent to mk-zprod; mk-zprod consults the WarpFramework do make sure we don't create too much work for ourselves, and also provides us with nice default HTML/DTML-pages, and finally, Formulator could be used to do validation on those HTML/DTML-pages. Exactly that. But the SmartWizard would provide you with a framework to build this Make New Python Product Wizard. If I get far enough, I will release the pre alpha today, just you see the proof of concept... Or are we talking past eachother here? Nope, we don't. But SmartWizard is a more general tool than you were thinking of it. It would be very cool to have a tool like that. I agree. It is annoying to code all that stuff all the time. Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development Technical Project Management ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] dtml-in bug?
Hi Christian, --On Montag, 28. Mai 2001 15:38 +0200 Christian Scholz [EMAIL PROTECTED] wrote: Hi! Dunno if it's again my strange setup, but I have some problem with dtml-in or maybe I simply didn't get something right.. Well, I used the following dtml code: html dtml-in expr=[1,2,3,4,5,6] size=4 abr /dtml-in /html *rustle* try orphan=0 :-) Greetings Tino and I thought I will get three a's as output.. instead I get 6.. If I do size=3 it's ok (3 output), if I do size=4 or 5 or 6 I get them all.. (actually it happened with some more complex list of Result objects but this seems to do the same here) Can someone explain that to me..? (it's Zope 2.3.2, Python 1.5.2, SuSE Linux 7.0) cheers, Christian -- COM.lounge http://comlounge.net/ communication design [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZEO on SMP
Hi Dyon, --On Donnerstag, 24. Mai 2001 05:07 +1000 Dyon Balding [EMAIL PROTECTED] wrote: Tino, Thanks for your reply. When you say it works fine on a dual processor machine, are you saying that a single ZEO client fully utilises both processors? or that you are running two ZEO clients successfully? I'm running 2 clients at the same time (actually I'm running 3: 2 clients for HTTP requests and one client for FTP) Unfortunately I'm currently stuck with Windows due to both political reasons, and because we are interfacing to a large SQLServer database. political reasons... will they never lern... However, we are using strange databases with ZmxODBCDA/mxODBC and Merant (http://www.merant.com) middleware. This way we only have one NT Box to access the databases. Regards Tino -d On Wed, May 23, 2001 at 08:44:59PM +0200, Tino Wildenhain wrote: Hi Dyon, ZEO on a dual processor machine runs fine for me. I'm using redhat-linux for the server (ZEO and Clients on same machine) If you dont need strange things I would not recommend Win2k as server platform. Best regards Tino Wildenhain --On Mittwoch, 23. Mai 2001 11:35 -0700 Dyon Balding [EMAIL PROTECTED] wrote: Hi, We are setting up a cluster of ZEO clients on dual processor machines. From some experiments and from searching through the mailing lists, it appears that a single Zope process will not take full advantage of the two processors. The solution would appear to be to run two ZEO clients on each server. This, however, is causing problems. I can successfully run two Zope (non-ZEO) processes on a single machine, but two ZEO clients don't seem to coexist nicely on the Windows 2000 machine. The second client to start will accept connections, but never responds with anything. Zope: 2.3.2, ZEO: 1.0b3, Windows 2k for clients, Linux and Windows 2k for storage server. Is there a better solution? If not, has anyone come across this problem? Any pointers appreciated -d ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) -- Dyon Balding [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZEO on SMP
Hi Dyon, ZEO on a dual processor machine runs fine for me. I'm using redhat-linux for the server (ZEO and Clients on same machine) If you dont need strange things I would not recommend Win2k as server platform. Best regards Tino Wildenhain --On Mittwoch, 23. Mai 2001 11:35 -0700 Dyon Balding [EMAIL PROTECTED] wrote: Hi, We are setting up a cluster of ZEO clients on dual processor machines. From some experiments and from searching through the mailing lists, it appears that a single Zope process will not take full advantage of the two processors. The solution would appear to be to run two ZEO clients on each server. This, however, is causing problems. I can successfully run two Zope (non-ZEO) processes on a single machine, but two ZEO clients don't seem to coexist nicely on the Windows 2000 machine. The second client to start will accept connections, but never responds with anything. Zope: 2.3.2, ZEO: 1.0b3, Windows 2k for clients, Linux and Windows 2k for storage server. Is there a better solution? If not, has anyone come across this problem? Any pointers appreciated -d ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Professional Sites Using Zope??
Hi Jawad, we use the existing heterogenous database system of your company for a B2B e-commerce solution. With zope we had the flexibility to do so and archive releability too. For access to databases we use Merant middleware together with ZmxODBC. Unfortunately the service is not open to the public. It has come out only the strange databases are somewhat a bottleneck for the system. However, we handle around 100 customer at any given moment round the clock. The other site we built with zope is our companys public web site. You'll find it on http://www.peacock.de/ HTH Tino Wildenhain --On Mittwoch, 16. Mai 2001 12:15 -0700 Jawad [EMAIL PROTECTED] wrote: Hi, I am a newbie in zope and want to use it to develop a e-commerce order processing system using Zope. I have experience in languages like Smalltalk and Java, so learning Zope is fun too. Please let me know What Database will be useful and please don't recommend MY SQL. It does not even support Foreign Key relationship. Does Zope support DB2 , SQL Anywhere, or Oracle.? I am also interested to know Is there any professionally developed sites in Zope/Python. Please let me know the URL. Regards Jawad ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] convert zope objects to unicode
Hi Sin, see http://dev.zope.org/Wikis/DevSite/Projects/SupportPython21/FrontPage for whats going on at the unicode-sector for zope. IMHO it does not make sense to duplicate effort. Regards Tino --On Donnerstag, 17. Mai 2001 01:27 +0800 Sin Hang Kin [EMAIL PROTECTED] wrote: If I would like to hack zope to store all string objects in unicode, where is the best place to do it? I would like to have the incoming string go through unicode(inputstr, encoding) and all outgoing strings go through with outputstring.encode(encoding) However, after looking around the zope source, I can not find where is the appropriate place to do it. Rgs, Kent Sin - kentsin.weblogs.com kentsin.imeme.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Experiments with ORMapping
Hi Shane, --On Donnerstag, 10. Mai 2001 11:32 -0400 Shane Hathaway [EMAIL PROTECTED] wrote: ... But storage of binary pickles was never the intention anyway. I created a little interface that would allow you to store different classes in different PostgreSQL tables. Before I got to implementing anything, Is this much like the ZPatterns approach? Or do we want to make some automatism to get tables created and destroyed according to ZClasses needs? though, I had to move to another project. But the file sketch shows (I hope) what I had in mind for making this work: programmers would call a bunch of functions that would put together a relational mapping tree. Now, in our discussion yesterday we decided ORStorage wasn't the right way to achieve relational mapping because there is no way for the database storage layer to have any context just given an OID. If we instead consider writing a replacement for the stuff that's mainly in Connection.py, life gets a lot simpler. At this level it *is* possible to know the parent OID of an object, though the current codebase does not use this opportunity. Also, we wouldn't have to pickle and unpickle unnecessarily. So, if we have context, the relational mapping tree can work. It would turn Zope into a purely relational application server, which a lot of folks apparently want. ;-) Oh, do they? ;) Me dont :-) Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping
Hi shane, I think the motivation people want an RDBMS storage beneth zodb is because they understand RDBMSes these days are performant, relieable and can quiete easy maintained. I've seen Java implementations using this approach to achive persistens using as example Powertier[tm] to explicit map oop data to an RDBMS. I didnt like it because you have to map your objects each time you create a class, keep in mind not to infere with others etc... Would it not be better to improve the abilities of the Filestorage to handle updates better? May be most of the storage system in C? With logfiles like modern RDBMSes use to incorporate fast changes? However, to avoid pickling/unpickling and may be to update on attribute-change, we need the approach you mentioned. What about using a real oodb for zope? Dont remember any particular product name, but I heard something. Regards Tino Wildenhain --On Donnerstag, 10. Mai 2001 12:39 -0400 Shane Hathaway [EMAIL PROTECTED] wrote: Tino Wildenhain wrote: But storage of binary pickles was never the intention anyway. I created a little interface that would allow you to store different classes in different PostgreSQL tables. Before I got to implementing anything, Is this much like the ZPatterns approach? Which part of ZPatterns are you referring to? The idea is to (generally) put all instances of a class in a certain table. But the implementation details having nothing in common with ZPatterns. Or do we want to make some automatism to get tables created and destroyed according to ZClasses needs? I was thinking there would be a default table where everything gets stored by default. A programmer then tells the ORMapping about specific classes and how to store them. So, if we have context, the relational mapping tree can work. It would turn Zope into a purely relational application server, which a lot of folks apparently want. ;-) Oh, do they? ;) Me dont :-) You know, it might be possible to get a team together to implement this. How many out there would be interested in pursuing it further? IMHO it's not as much work as it sounds at first. Zope being so object-oriented, you really can replace one of its most fundamental assumptions (an OODBMS) with something else (an RDBMS) without a huge effort. Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] another Zope hanging..
Hi, most problems with hanging zope come from external RDBMS-access. You wont see anything useful in the logs because there are some objects published before the *sql-method is hanging. If you have a monitor program for your database, you see many blocks on tables or rows during this times. I expect it with DB-adapters not fully thread aware and - with to high timeout. In fact it seems we need timeoutsockets and asynchronous rdb-access. If one thread is hanging, in the scope of 120 instructions, zope has to wait before the global interpreter lock frees. So if its stuck in the call of a C library (database adaptors are most in C) it cannot continue until the call returns. Regards Tino Wildenhain --On Donnerstag, 3. Mai 2001 17:51 +0200 Christian Scholz [EMAIL PROTECTED] wrote: Hi! Alright... so you're getting an OSError 11, and you're using Zope 2.3.1. errno 11 is temporarily unavailable which means about as much as foobar feeblefar as far as I'm concerned ;-). great :) Though you've said the -M log isn't helpful here, I think it is. If this is happening when a certain method is hit, or at a certain time of day, or when a certain number of connections are reached, etc., the -M log in combination with requestprofiler can help determine this. Otherwise it's a guessing game. ok, just thought that maybe some exception can be caught.. I will try to use requestprofiler now, though I checked the -M log before and around that time there was no obvious problem.. (also it's not loaded at the moment and it's happening here and then, don't see a pattern there..) I will check (and maybe change the mysql adapter, as I recently had problems with it on a sun machine, too). thanks anyway :) Christian ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] wxPython + ZODB = bliss
Hi Shane, --On Dienstag, 24. April 2001 14:08 -0400 Shane Hathaway [EMAIL PROTECTED] wrote: http://www.zope.org/Members/hathawsh/pyTree very nice! :))) Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope] standard_error_message woes!
Hi Chris, Chris Withers wrote: *snip* PS: almost related, have you noticed how there's no way you can prevent Zope (other than hacking the source) from tacking the error message on the end of the HTML stream, even in production mode? Not only does this produce badly formed HTML, but it gives out way more information that it should to someone potentially looking to hack your site... Where was that? I got the position in the source some time... May be we can patch it here and there to get what we all want ;-) And then put it in the collector (which currently lacks an upload facility for patches). This means including the error pages for 40x. I'm also a fan of localisated error messages as well as wap-alized ones ;) In the meantime, have a merry x-mas :-) Regards Tino PS: Chris, will you be in amsterdam? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] More on DB Transactions
We are using ZmxODBC for a bounch of ODBC databases as well on windows as on linux. Out of the box its not very well written. If you patch it here and there, it works much faster then ZODBC-DA, that is, its multithreaded. I'm not complete happy with my patches, so I dont release them in this current state. But I will do so soon. On request, I can give what I have now. Regards Tino Wildenhain Rik Hoekstra schrieb: Paolo Quaglia wrote: Reading the [EMAIL PROTECTED] archive I found one message with an interesting sentence: [Message] I am currently considering and evaluating Zope as one of the options we have to build a really large, completely databasedriven "enterprise scale" web-platform. I am a bit worried about this "maximum of 7 threads per db This isn't a maximum. It's just the default. It's easy to increase the number of connections. [/Message] Where is this Default and How can I increase this counter?? Thanks very much in advance AFAIK the ZODBC adapter is still single threaded. See http://www.zope.org/Members/petrilli/DARoadmap for more information, though I'm not certain wether this page is still up to date. There are rumours that for SQL Server you could use the mxODBC adapter, though I know nothing more of it. Recently there were posts on this list about using the ZSybase Adapter for SQL Server they're probably thread safe as well (?). Do a search in the archives for more info ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Patch to avoid hypenation variables and more
Hi again, anybody had time to test this? Chances for next zope release? Any remarks? Alternatively, btw. would be a name attribut, which defaults to "sequence". Regards Tino Tino Wildenhain schrieb: Michel Pelletier schrieb: The second problem is if you put one in-tag into another. You have to use dtml-let oder REQUEST.set() with variables of the outher in-tag to be able to reference them in the inner loop. The code becomes very ugly this way. So my idea was to give the in-tag an optional argument, called "prefix" to prefix all the sequence-variables with a custom identifier. So you can write: dtml-in some_sequence prefix="outer_" dtml-in some_other_sequence dtml-var outer_sequence_item:dtml-var sequence_item /dtml-in the inner sequence /dtml-in the outer sequence What do you think about this? It's cool. Your patches are big and therefore, naturally, are a bit worrisome to us in terms of checking them into the core. Do you have a set of test DTML scripts that verify your patch? Say, a set of scripts that verifies backwards compatibity, and a set of scripts that verifies the new functionality? I would suggest even investigating "ZUnit" and creating DTML unit tests. Then we would *really* love you. ;) Have to find this ZUnit... ;) Ok, I made some further tests and improvements. There was a mistake (ok, it comes from variables spilled randomly over DT_In.py and DT_InSV.py ;) with the prefix. In some cases it wasnt there as supposed. Now all the prefix-handling should be ok. I've made an yet simple test-suite, all available thru http://www.zope.org/Members/tino/ (See "Patch for dtml-in" there) Note: the prefix prepends only the in-tags own variables. Any attribute coming from the sequence is untouched. This is also true for statistic variables and the magic "mapping" symbol. While it could easy be implemented, I think prefixing all attributes is not such a good idea. If you are ilterating over database queries you can rename the attributes there. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Patch to avoid hypenation variables and more
Hi, anybody had time for testing? May be we could have it in the next zope release. Any comments, remarks? How about an alternatively or extra "name"-attribute wich defaults to "sequence" ? Another issue: what about an alias for dtml-var called something like: dtml-print dtml-output or dtml-out ? Just for the ones that lern zope. Since I often see the missunderstood meaning of dtml-var in such constructs like: dtml-var "somelist[dtml-var indexvar]" you know what I mean? I think it would be more obvious, if the tag would usually be called dtml-out or something. Regards Tino Tino Wildenhain schrieb: Michel Pelletier schrieb: The second problem is if you put one in-tag into another. You have to use dtml-let oder REQUEST.set() with variables of the outher in-tag to be able to reference them in the inner loop. The code becomes very ugly this way. So my idea was to give the in-tag an optional argument, called "prefix" to prefix all the sequence-variables with a custom identifier. So you can write: dtml-in some_sequence prefix="outer_" dtml-in some_other_sequence dtml-var outer_sequence_item:dtml-var sequence_item /dtml-in the inner sequence /dtml-in the outer sequence What do you think about this? It's cool. Your patches are big and therefore, naturally, are a bit worrisome to us in terms of checking them into the core. Do you have a set of test DTML scripts that verify your patch? Say, a set of scripts that verifies backwards compatibity, and a set of scripts that verifies the new functionality? I would suggest even investigating "ZUnit" and creating DTML unit tests. Then we would *really* love you. ;) Have to find this ZUnit... ;) Ok, I made some further tests and improvements. There was a mistake (ok, it comes from variables spilled randomly over DT_In.py and DT_InSV.py ;) with the prefix. In some cases it wasnt there as supposed. Now all the prefix-handling should be ok. I've made an yet simple test-suite, all available thru http://www.zope.org/Members/tino/ (See "Patch for dtml-in" there) Note: the prefix prepends only the in-tags own variables. Any attribute coming from the sequence is untouched. This is also true for statistic variables and the magic "mapping" symbol. While it could easy be implemented, I think prefixing all attributes is not such a good idea. If you are ilterating over database queries you can rename the attributes there. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Random choice in dtml-in?
Hi J, "J. Atwood" schrieb: I think dtml-with "_.whrandom.choice(folder_name.objectValues())" /dtml-with should do what you want. HTH Tino Wildenhain Ok.. so I can get a random item out of a folder with. dtml-var expr="_.whrandom.choice(folder_name.objectValues())" And I can iterate through a folder with dtml-in "folder_name.objectValues()" size="1" dtml-var id, dtml-var title, dtml-var other_attribute /dtml-in But I want to include the random statement within the dtml-in so I can get more of the object values back. I know this must be some little ._."_.. or other such mix but I am getting frustrated trying. Thanks, J ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question -- database list/report with sort bycolumn header
Hi, Chris Gray schrieb: Here's a fragment from a table that allows sorting by clicking the header in a dtml method named 'displayTable': table tr tha href="displayTable?sort_key=ID+desc"ID/a/th tha href="displayTable?sort_key=product"Product/a /tr dtml-in "SQLSelectQuery(sort_key=REQUEST['sort_key'])" Then feed sort_key into your SQLSelectQuery to use in an ORDER BY clause. select * from table order by dtml-var sort_key You schould never do so. Unquoted variables in SQL-statements are high security risc if they came from REQUEST. As an example someone can send a string which ends a statement and begins a new one, like drop table. Instead reference only an index of a list with the columns to sort. oder by dtml-sqlvar orderindex type=int is also a solution. The index ranges from 1 to number of returned values. Regards Tino You can change the properties of an object in DTML by callling its manage_changeProperties method, for example: dtml-call expr="foo.manage_changeProperties(bar='New Value')" will changes the value of foo's bar property to 'New Value'. There are several ways of getting the effect of assigning variables in DTML, but it really isn't meant to have a direct way of declaring and assigning variables. The way you're trying to use an object's properties will, I believe, cause problems in the case of simultaneous users, because it will act as a global variable. Cheers, Chris On Mon, 4 Dec 2000, John Cappelletti wrote: I am listing the results of a database query using dtml-in. I'd like to be able to give the user the option to re-sort the list by clicking on a column header. ok... I'm starting small with a form and radio buttons to allow the user to specify the sort. I've created what I believe to be a global variable for this page using the property screen. The variable is to capture the column name for the sort. My simple question is how do I assign a value to this variable inside of the dtml method! I'm not finding a description of variable assignment in the documentation (yeah, I must be missing the obvious). Any pointers would be appreciated. (also, know if anyone has implemented interactive sort by column header?) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Patch to avoid hypenation variables and more
Michel Pelletier schrieb: The second problem is if you put one in-tag into another. You have to use dtml-let oder REQUEST.set() with variables of the outher in-tag to be able to reference them in the inner loop. The code becomes very ugly this way. So my idea was to give the in-tag an optional argument, called "prefix" to prefix all the sequence-variables with a custom identifier. So you can write: dtml-in some_sequence prefix="outer_" dtml-in some_other_sequence dtml-var outer_sequence_item:dtml-var sequence_item /dtml-in the inner sequence /dtml-in the outer sequence What do you think about this? It's cool. Your patches are big and therefore, naturally, are a bit worrisome to us in terms of checking them into the core. Do you have a set of test DTML scripts that verify your patch? Say, a set of scripts that verifies backwards compatibity, and a set of scripts that verifies the new functionality? I would suggest even investigating "ZUnit" and creating DTML unit tests. Then we would *really* love you. ;) Have to find this ZUnit... ;) Ok, I made some further tests and improvements. There was a mistake (ok, it comes from variables spilled randomly over DT_In.py and DT_InSV.py ;) with the prefix. In some cases it wasnt there as supposed. Now all the prefix-handling should be ok. I've made an yet simple test-suite, all available thru http://www.zope.org/Members/tino/ (See "Patch for dtml-in" there) Note: the prefix prepends only the in-tags own variables. Any attribute coming from the sequence is untouched. This is also true for statistic variables and the magic "mapping" symbol. While it could easy be implemented, I think prefixing all attributes is not such a good idea. If you are ilterating over database queries you can rename the attributes there. Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to specify to z sql methods, the connection object to use at runtime...time...
Hi Frederic, Frederic Quin schrieb: Hi all, I have the same querry to execute on different servers. I don't want to create as many z sql methods as servers I have. I would like to specify to my z sql method, the connection object to use at run time. Do I have to patch the files of z sql methods ? Can I use directly the connection object ?? A clean approach would be subclassing the zsql-method for your purpose. I would not recommend a free-form string as argument for the Datasource. May be an integer index (first, second, third... database server) or something like that? Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Patch to avoid hypenation variables and more
Hi there, finally I want to release my patch for the in-tag. I hope it finds its way into the source-tree. I was sick writing such ugly constructs as _[_['sequence-item']] and so on, so I patched DT_In.py and DT_InSV.py (in lib/python/DocumentTemplate) to use sequence_item as well. All hypenation variables have now a second representation with underscores instead of hypenation. I hope, some time we can drop these hypenation variables. The second problem is if you put one in-tag into another. You have to use dtml-let oder REQUEST.set() with variables of the outher in-tag to be able to reference them in the inner loop. The code becomes very ugly this way. So my idea was to give the in-tag an optional argument, called "prefix" to prefix all the sequence-variables with a custom identifier. So you can write: dtml-in some_sequence prefix="outer_" dtml-in some_other_sequence dtml-var outer_sequence_item:dtml-var sequence_item /dtml-in the inner sequence /dtml-in the outer sequence What do you think about this? Attached are the patch files (g-zipped) They are a bit of size, but I choosed to send them as diff, as requested to avoid flames ;) (Althought the original files would be similar in size) If someone wants the whole files, feel free to write to me) Regards Tino DT_In.py.diff.gz DT_InSV.py.diff.gz
Re: [Zope] Patch to avoid hypenation variables and more
Hi Chris, Chris Withers schrieb: Tino Wildenhain wrote: finally I want to release my patch for the in-tag. I hope it finds its way into the source-tree. Looks very cool :-) Is it in the collector yet? I've put it on the collector, but I'm not very sure I did it the right way ;-) But lets hope we can have it in the next release... Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope/Posgresql/RedHat Linux
Hi, "Bak @ kedai" schrieb: is a suitable combination. I have attempted to configure this combination but run into trouble compiling PoPy-1.4.1 on RedHat Postgresql - and have not been able to resolve the problems via RedHat or Mixadlive - hence my question. Regards, Chris Marshall [EMAIL PROTECTED] why not post the question. we (www.emedia.com.my) have been using rh, zope and postgresql since february this year. all in all, everything works great. we have yet to use PoPy on the production site since it involve an upgrade of postgresql. we're using zPygresSQL currently Currently testing Zope2.2.2, Python 2.0, PostGresql, PoPy with RedHat 6.x RH 7.0 isnt recommendet at the moment. The above configuration works flawlessy. There are some warnings during compilation of PoPy because of the differents to Python 1.5.2. I would not recommend to disable transactions on the DA, since it is a strenght of Postgres and Zope. I dont understand why there is such an option at the DA. Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] CMS/publishing system
Pete Prodoehl schrieb: ...snipp... We want to deploy across 50+ sites. (Since it's open source, we'd spend our money on customization/development rather than licensing fees.) We'd prefer a browser based administration system. (Zope's already got a very good one.) Yes, its very good, but could be better. Its currently too hard wired I think. Some questions I have are: How well does Zope integrate applications/cgi's written in ASP, Cold Fusion, Perl, etc...? As we've got a number of things we'd prefer to keep as is, and run alongside Zope. Nope. You should take the chance to reimplement them. You get better performance and much cleaner solutions (better to maintain and more secure) then any of the mentioned solutions allow. Many things are better done completely different in zope. How does Zope deal with serving virtual domains off of a single NT box? What approach would that require? There are several options. One of it is site-access (product at zope.org) You can also server different instances of zope off the same server (using different ports and apache or squid in front as dispatcher) Zope looks like a really nice platform, any real-world evaluations would be most appreciated... We are currently implementing a light CMS. So stay tuned... ;) Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] expr=id 'index_html issue
hi, as usual, if such things happen, "id" is a method. it gets called by zope if you just use dtml-var on it. So either use id() or better, look for title and if not set (dont set a title on html_index then) dont display it. Regards Tino [EMAIL PROTECTED] wrote: Okay, this is my second question for the day. Hopefully it won't be as easy as the first -- otherwise, I'll have to stick to practicing law. I'm looking for a way to list the DTML Methods in a folder -- except the index_html method. So far, I've had to do it by using this: dtml-in expr="objectValues('DTML Method')" sort="title" dtml-if expr="title 'The Title'" td align="center"a href="dtml-absolute_url;"dtml-var title_or_id/a/td /dtml-if /dtml-in This works but it is a maintenance headache. A more elegant (and reuseable) solution would be to use the id, which is always 'index_html' for the to-be-excluded method. However... dtml-in expr="objectValues('DTML Method')" sort="title" dtml-if expr="id 'index_html'" td align="center"a href="dtml-absolute_url;"dtml-var title_or_id/a/td /dtml-if /dtml-in .. doesn't work. Does anyone know why? Thanks in advance, Ron ./. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Socket.error problem
Hi Ronald, "Ronald L. Chichester" wrote: I'm getting the exact same socket.error message that appeared on this list in March, 2000. (See the attached problem.txt file.) Specifically, this is the error message that I get when I start zope. The person who kindly identified the problem didn't provide a solution. I have my netstat -a results attached as netstat.txt. Could someone tell me how I can resolve this port conflict? Incidentally, I'm using Mandrake 7.1 in a fairly standard configuration. Thanks in advance, Ron ./. This is the reply that was provided to the first person who encountered this problem (and submitted it to the list): MESSAGE You have another process that is "bind" to port 98... this is the registered port for "tacnews". try "netstat -a" under the shell... - Message d'origine - De : Ulf Byskov [EMAIL PROTECTED] À : [EMAIL PROTECTED] Envoyé : lundi 13 mars 2000 11:28 Objet : [Zope] socket problem When I try to start Z Server i get the following error messages: File "/WWW/Docs/product_development/teams/AMD_framework/dev/Zope/ZServer/medusa/a syncore.py", line 205, in bind return self.socket.bind (addr) socket.error: (98, 'Address already in use') I don't use the number 98 in any address or port (http=80, ftp='' and monitor='') so what could this error be about ? tcp0 0 *:8021 *:* LISTEN I suspect this line to be the offending one. IIRC the number "98" isnt actually a port number but a error number of the socket-lib. Your zope-ftp-server probably tries to bind 8021 which is not possible. HTH Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can you specify user/group to run Zope as during install
Hi Yusuf, Yusuf Goolamabbas wrote: I would like to run Zope not as user 'nobody' but as something else. Is this possible somehow, also is it possible to install the Zope tree in a location other than that untarred into [something like ./configure --prefix=/usr/local/site/Zope] Regards, Yusuf You can Zope install whereever you want. For the user look in z2.py for "UID". Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] HTML-Code in variables (addition)
Hi Lars, Lars Heber wrote: Sorry, I mixed something up. Normal html is no problem at all. The problem is how to use quotes or such things. Of course I get an error by typing: dtml-let text="my html text with a link to a href="http://www.yahoo.com"Yahoo!/a" I tried typing quot; instead of ", but then the "quot;" also goes into the html code on my page - thus the link is broken... Are there any possibilities to let Zope change the quot; into ", or perhaps there is another way to do it like with the \" in C. Yes, there is. Use documenttemplates for this. This is exactly what Zope is designed for :-) I.e. make an dtml-method with the text instead of trying to build it like this. Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Favorites
Hi rishi, rishi wrote: ... The following tihng is going on; they are uploading the bookmark file manualy, by exporting from IE or NS. There is a util called "ImportExportFavorites", a javascript syntax that gets the bookmarks and post them to the server. One has to have a glance at it to say more. --" javascript:window.external.ImportExportFavorites(false,'your server adress') "-- when I use this util, it will send it's data tru the http_user_agent called "favorites", is there a posible way for grabbing the data it is sending into zope ? it will send a file called 'img.fav' Depends. It would always helpful, if you make a dtml_method with just dtml-var standard_html_header dtml-var REQUEST dtml-var standard_html_footer to see whats going on. HTH Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Guess Who . . .
Hi, nice :-) "Spicklemire, Jerry" wrote: . . . has a opening posted on their Web Site for a C/C++ programmer with Zope / Python experience? http://www-3.ibm.com/employment/us/empl/jofK23137.html ... Experience Required Six years work related experience they must be from a different planet ;-) Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope not starting after VaryTag install
Hi Didier, so it looks like the vary Tag may be not compliant to older ( 2.2.x) releases of Zope? I have to check this. You should probably check if you really need an ancient version of Zope ;-) I'm really wondering how the tag can cause such a behavior. Its almost an extract of the mime-tag implementation which ships with zope. Certanly you have a copy of your Data.fs before installation? Good luck Tino Didier Georgieff wrote: Hello, Just after installing VaryTag, Zope (2-1-6) restart fine, but when i try to connect to my zope adress, i got an error (traceback further). So i stopped Zope, removed the VaryTag product, and the error is still here. So, i don't have access to my manage screen to remove the VaryTag traces or anything slse. Any quick tip would help me a lot, an avoid killing myself for loosing access to my site ;-)) Thanks in advance Zope Error Zope has encountered an error while publishing this resource. ImportError Sorry, a Zope error occurred. Traceback (innermost last): File /zope/2-1-6s/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /zope/2-1-6s/lib/python/ZPublisher/Publish.py, line 179, in publish File /zope/2-1-6s/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File /zope/2-1-6s/lib/python/ZPublisher/Publish.py, line 165, in publish File /zope/2-1-6s/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /zope/2-1-6s/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: index_html) File /zope/2-1-6s/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: index_html) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: index_html) File /zope/2-1-6s/lib/python/OFS/DTMLDocument.py, line 162, in __call__ (Object: zope_powered) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_String.py, line 443, in __call__ (Object: zope_powered) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_String.py, line 381, in cook (Object: zope_powered) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_String.py, line 231, in parse (Object: zope_powered) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_Var.py, line 248, in __init__ File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_Util.py, line 357, in name_param (Info: ({'': '"zope_logo.tag(BORDER=\'0\')"'}, 'var', 1, 'name')) File /zope/2-1- 6s/lib/python/DocumentTemplate/VSEval.py, line 157, in __init__ ImportError: No module named gparse ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re(2): [Zope] Zope not starting after VaryTag install
Re again, I just checked with 2.1.6 (winNT) and it worked without problems. Can anybody else confirm this? Regards Tino Didier Georgieff wrote: Hello, Just after installing VaryTag, Zope (2-1-6) restart fine, but when i try to connect to my zope adress, i got an error (traceback further). So i stopped Zope, removed the VaryTag product, and the error is still here. So, i don't have access to my manage screen to remove the VaryTag traces or anything slse. Any quick tip would help me a lot, an avoid killing myself for loosing access to my site ;-)) Thanks in advance Zope Error Zope has encountered an error while publishing this resource. ImportError Sorry, a Zope error occurred. Traceback (innermost last): File /zope/2-1-6s/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /zope/2-1-6s/lib/python/ZPublisher/Publish.py, line 179, in publish File /zope/2-1-6s/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File /zope/2-1-6s/lib/python/ZPublisher/Publish.py, line 165, in publish File /zope/2-1-6s/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /zope/2-1-6s/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: index_html) File /zope/2-1-6s/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: index_html) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: index_html) File /zope/2-1-6s/lib/python/OFS/DTMLDocument.py, line 162, in __call__ (Object: zope_powered) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_String.py, line 443, in __call__ (Object: zope_powered) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_String.py, line 381, in cook (Object: zope_powered) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_String.py, line 231, in parse (Object: zope_powered) File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_Var.py, line 248, in __init__ File /zope/2-1- 6s/lib/python/DocumentTemplate/DT_Util.py, line 357, in name_param (Info: ({'': '"zope_logo.tag(BORDER=\'0\')"'}, 'var', 1, 'name')) File /zope/2-1- 6s/lib/python/DocumentTemplate/VSEval.py, line 157, in __init__ ImportError: No module named gparse ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Modification Posts to the list (was: [Zope] Import from file viamanagement-interface)management-interface)
Hi Dieter, Dieter Maurer wrote: Hi Tino (and other potential patch posters), if possibly, you should not post complete source modules to the list. Instead, you should use either context or uniform differences to the source. Such a difference file is called a patch. Yes. I know that ;-) (Beside the file size, which was really wrong to send to the list, you can of course diff the post with your version to get the changes) Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Import from file via management-interface
Hi Bill, Bill Anderson wrote: How about just the patch next time, as opposed ot the whole patched filed? Ah yes, sure. On the other hand its more convient for the windows people, without a patch at hand... regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Import from file via management-interface
Hi Terry, Terry Kerr wrote: you can write anything destructive, whether it is an external method, a DTML Method, or basically anything. At least if the only way you can import .zexp's is from the import directory, then only people with access to the zope file structure can import stuff...that will usually be restricted to system administrators or superuser people. Hm. I dont see the point here. First you can restrict the ability to Export/Import in the users role. Second, the either the superuser has to be bothered with imports or you have to grant all the people access to the file system. This would be much lesser security as beeing able to import via web. May be I schould have a deeper look at the ownership-problem. Giving the importing user ownership over all objects (s)he imports as long it is not the superuser, schould do the trick. Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Import from file via management-interface
Hi, Martijn Pieters wrote: On Sat, Sep 09, 2000 at 09:39:33AM +0200, Tino Wildenhain wrote: Terry Kerr wrote: you can write anything destructive, whether it is an external method, a DTML Method, or basically anything. At least if the only way you can import .zexp's is from the import directory, then only people with access to the zope file structure can import stuff...that will usually be restricted to system administrators or superuser people. Hm. I dont see the point here. First you can restrict the ability to Export/Import in the users role. Second, the either the superuser has to be bothered with imports or you have to grant all the people access to the file system. This would be much lesser security as beeing able to import via web. May be I schould have a deeper look at the ownership-problem. Giving the importing user ownership over all objects (s)he imports as long it is not the superuser, schould do the trick. The problem is not so much ownership of the objects imported, but the type of objects that can be instanciated from a pickle (the export format wether XML or binary, consists of pickled classes). You can create _everything_ from a pickle, as long as there is a class definition for it; including a monitor client. I can open up a high port on your machine that'll let me connect to your Zope process in a python interpreter prompt. Then your server is my oister. Thats badly true, but importing of a whole bunch of objects is also often needed. IIRC does pickle only handle instance data but not class code. (although I see using of marshal in the import code which does in fact import code as oposite to pickle) Importing instance data schould not be a problem since it can only work if the user in question has access to the classes. This access is already handled by permissions. Moreover we could restrict importing via web to the superuser at all. Allowing imports from arbitrary paths will let me exploit security holes in other internet daemons on your machine to create a pickle file for import; preferably the /tmp directory as it is world writeable. Restricting imports to one directory allows you to be much more restrictive as to who can write there. You can set up restricted FTP access or even only allow scp (ssh encrypted file transfer) for trusted people to upload exports to the Zope import directory if you need to give others import rights. Uh, do you know any ssh-daemon for windows? ;-) Regards ;-) Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Import from file via management-interface
Hi all, I found it very disturbing having to get my .zexp exports into the subdirectory 'import' of the server and then using the management-interface to do the actual import. So I patched ObjectManager and the compaining dtml-file. Please check them out (included in the mail, sorry for the traffic) if I should post them to the collector. Regards Tino ## # # Zope Public License (ZPL) Version 1.0 # - # # Copyright (c) Digital Creations. All rights reserved. # # This license has been certified as Open Source(tm). # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions in source code must retain the above copyright #notice, this list of conditions, and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright #notice, this list of conditions, and the following disclaimer in #the documentation and/or other materials provided with the #distribution. # # 3. Digital Creations requests that attribution be given to Zope #in any manner possible. Zope includes a "Powered by Zope" #button that is installed by default. While it is not a license #violation to remove this button, it is requested that the #attribution remain. A significant investment has been put #into Zope, and this effort will continue if the Zope community #continues to grow. This is one way to assure that growth. # # 4. All advertising materials and documentation mentioning #features derived from or use of this software must display #the following acknowledgement: # # "This product includes software developed by Digital Creations # for use in the Z Object Publishing Environment # (http://www.zope.org/)." # #In the event that the product being advertised includes an #intact Zope distribution (with copyright and license included) #then this clause is waived. # # 5. Names associated with Zope or Digital Creations must not be used to #endorse or promote products derived from this software without #prior written permission from Digital Creations. # # 6. Modified redistributions of any form whatsoever must retain #the following acknowledgment: # # "This product includes software developed by Digital Creations # for use in the Z Object Publishing Environment # (http://www.zope.org/)." # #Intact (re-)distributions of any official Zope release do not #require an external acknowledgement. # # 7. Modifications are encouraged but must be packaged separately as #patches to official Zope releases. Distributions that do not #clearly separate the patches from the original work must be clearly #labeled as unofficial distributions. Modifications which do not #carry the name Zope may be packaged in any form, as long as they #conform to all of the clauses above. # # # Disclaimer # # THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY # EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL CREATIONS OR ITS # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # # This software consists of contributions made by Digital Creations and # many individuals on behalf of Digital Creations. Specific # attributions are listed in the accompanying credits file. # ## __doc__="""Object Manager $Id: ObjectManager.py,v 1.98.8.7 2000/08/17 20:20:01 shane Exp $""" __version__='$Revision: 1.98.8.7 $'[11:-2] import App.Management, Acquisition, Globals, CopySupport, Products import os, App.FactoryDispatcher, ts_regex, Products from OFS.Traversable import Traversable from Globals import HTMLFile, HTMLFile, Persistent from Globals import MessageDialog, default__class_init__ from webdav.NullResource import NullResource from webdav.Collection import Collection from Acquisition import aq_base from urllib import quote from cStringIO import StringIO import marshal import App.Common from AccessControl import getSecurityManager from zLOG import LOG, ERROR import sys import XMLExportImport customImporters={ XMLExportImport.magic: XMLExportImport.importXML, }
Re: [Zope] Whitespace in lines property
Hi Tim, Tim Cook wrote: Tino Wildenhain wrote: Hi Tim, Tim Cook wrote: Can anyone tell me why when I edit a lines property I get leading whitespace inserted? The first line gets seven each one after that gets 10 spaces. I tried stripping it out but this didn't seem to have any effect. ... textarea name="alt_names:lines" rows="10" cols="50" dtml-in alt_names dtml-let cur_item=sequence-item ^^^ here^here dtml-var "_.string.strip(cur_item)" ^ here^here /dtml-let ^^^here ^ here /dtml-in /textarea here marks your whitespaces. try: textarea name="alt_names:lines" rows="10" cols="50" dtml-in alt_namesdtml-let cur_item=sequence-itemdtml-var "_.string.strip(cur_item)" /dtml-let/dtml-in/textarea Ugly code, but... Well, "realize something NEW everyday!" It never crossed my mind that the space between my code elements would be rendered. DUH! Hehe ;) I'm currently playing with a clean-up tag, to remove whitespaces/empty lines in code. May be I release it, if its fully done. Stay tuned ;-) Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Using Chinese Characters
Hi Kelvin, Kelvin Cheong wrote: i was wondering how i can use chinese characters with Zpe on Linux. does anyone know how? According to my "mild" research so far, i found out that Big5is a 2-byte code and is a part of ISO-10646/Unicode. It also seems to be the de-facto for traditional chinese characters. There're also Unicode CJK and GB. But GB is for China, which uses simplified chinese characters. And CJK includes both Big5 and GB. classic zope is built on python 1.52 and does not naturally support unicode. But there is a light on the horizont: http://www.zope.org/Members/htrd/wstring I have a vision of everything working together for localizing and internationalisation ;-) Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ANN: want to localize your pages and/or zope?
Hi, last night I realized my finger-trainnig called VaryTag :-) I talkt about it at EuroZope meeting in paris, but lost my old implementation during deleting of old zope instances. So it took me 3.5h to rewrite it from scratch. This time it works according to rfc2616 (HTTP/1.1). Its just one solution for serving multi language documents, but it works very well. I will soon localize the current zope with it as well as our websites will be localized. Its easy to use, just look at http://www.zope.org/Members/tino/Vary%20tag/readme/ Sorry for the ugly url with space, it was deep in the night ;-) Unfortunately zope.org has not installed the product already, so I was not able to give the readme in different languages .-)) Best regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] re module through the web security
Hi, Chris Withers wrote: Chris McDonough wrote: There's the perception at DC that 're' isn't appropriate for through-the-web usage because it's possible to write and use regex that sends the Python interpreter thread it's operating within into a neverending loop. Sorry. Am I the only one who thinks this is silly? One of Zope's key strengths is its granular security, right? So why isn't it the reponsibility of the site designer/maintainer/owner/whatever to ensure that only people he trusts have the ability to write DTML? It seems like that perception is hobbling Python Methods, in particular, by removing useful stuff like the re module because the assumption is being made that people editing TTW code will be untrusted. IMH(umble), either you don't have confidence in Zope's security, or you're assuming your users are stupid (that may be fair for a lot of us, but still ;-) Comments? :-) I think the granularity could be finer. If one could give some users access to more 'riscy' modules and some not, it schould be sufficient. I schould write a proposal for thru the web python products... *g* Greetings Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Whitespace in lines property
Hi Tim, Tim Cook wrote: Can anyone tell me why when I edit a lines property I get leading whitespace inserted? The first line gets seven each one after that gets 10 spaces. I tried stripping it out but this didn't seem to have any effect. ... textarea name="alt_names:lines" rows="10" cols="50" dtml-in alt_names dtml-let cur_item=sequence-item ^^^ here^here dtml-var "_.string.strip(cur_item)" ^ here^here /dtml-let ^^^here ^ here /dtml-in /textarea here marks your whitespaces. try: textarea name="alt_names:lines" rows="10" cols="50" dtml-in alt_namesdtml-let cur_item=sequence-itemdtml-var "_.string.strip(cur_item)" /dtml-let/dtml-in/textarea Ugly code, but... HTH Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Underscore Caracter
Hi Chris, Chris McDonough wrote: Hi Marcus, This is untested. Turn "asd asd" into "asd_asd" and output: dtml-var "_.string.join(_.string.split('asd asd'), '_')" Turn "asd_asd" into "asd asd" and output: dtml-var "_.string.join(_.string.split('asd_asd', '_'))" I've seen this on plenty lines of digicools code and wondered about if this is more efficient then using just string.replace() ? I would say string.replace() should be a bit faster. Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Socket.Error
Hi, Matthias Füsting wrote: The other day I have change my hostname. Today I have restart ZOPE and I get follow Error-Message: 2000-08-30T20:12:44 PROBLEM(100) ZServer Computing default hostname Traceback (innermost last): File "/opt/zope/2-1-6/z2.py", line 493, in ? logger_object=lg) File "/opt/zope/2-1-6/ZServer/medusa/http_server.py", line 560, in __init__ ip = socket.gethostbyname (socket.gethostname()) socket.error: host not found Zope does a so called double-reverse lookup to make sure one can unduptfully reresolve the hostname to its ip-address again. It asks first for the name to the ip-address. Then it asks for the ip-address to this name. The question is, where did you change the name? In DNS you have to change it in both databases. Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] SQL Methods
Hi Campaan, RC Compaan wrote: I have a sql method and a dtml method calling the sql method. They live in the same folder and the dtml method's proxy roles are set. I've tried everything and Zope tells me I don't have permission to do view the sql result returned by the sql method. This worked fine in Zope 2.1.6 so I guess it has something to do with the new security model. I also have explicit ownership of all objects that I'm working with - still no luck. There was a bug in sql-methods returning subobjects without giving them the proper access rights. This was due to a change in the security mechanism on 2.2.x. The default policy is now: disallow everything as log as its not explicitely permittet. I would suggest to look for the patch on sql-methods or simply upgrade to the latest 2.2.1 where this (and much more) has already been fixed. Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Copying a dtml method when creating a ZClass instance
Hi, kamon ayeva wrote: I have several reasons whay I need to attach a template to each ZClass. Among them are: 1/ cases like high level folders where I might want to customize the page's rendering and/or skin, 2/ cases like contained objects which uses a generic skin (but you can still customize the skin of one among them, if you want) 3/ my site needs to be easily designed / modified by Web Designers that do not understand Acquisition. Ah yes. But then, you throw all the advantages of aquisition away. I would suggest to at least copy the template only on request, if changes are really made. The 'web designers' should have the opportunity to delete this template to derive their design from the previus folder. This way you would not have all the templates laying around in every subfolder and making changes very very hard. An yes, this is understandable even by the underenlighted web designer ;-) Cheers Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Copying a dtml method when creating a ZClass instance
Hi Kamon, kamon ayeva wrote: Hi, I need some help. I have a DTML method at the root of Zope called 'Template'. How can I make the constructor of a ZClass (folderish) to copy this method to each of its instances ? Can someone provide me with a complete snippet to add in the ZClass constructor ? Copy? Why? aquisition should make it 'visible' in every subfolder automatically. Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Linux and ODBC
Hi Tony, Tony Corrente wrote: Hello.. I am currently using the openlink ODBC drivers to access Progress DB's on a HPUX System from A Linux Web Server using Apache and PHP4. It Works... The rest of my site has been moved to Zope. Everything I've read states that the Zope DA's for ODBC only run under the Win32... Is anyone working on this ?? or how do I do it from Linux ?? I don't want to install a N(asty)T(hing) server if I can avoid it.. This is not really true. The ZmxODBC DA cames with full sources. I was able to build most of it under linux. You have to move part of the distribution into different places. When I fully succeed ( I had plain mxODBC running already!) I will make an how-to of it. So please stay tuned ;) Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Microsoft SQL Server Access under Linux?
Hi Darin, Darin Lee wrote: Zopistas, Is it possible to access an ODBC data source through Zope running under Linux? I have perused the literature, and it appears the Zope DA's for ODBC only run under the Win32 environment. I would very much like to setup ZAP (for many reasons), but our "organizational standard" is MS SQL Server 6.5. It might or might not be helpful for you. I also have a bunch of databases only accessible via ODBC, so we use Merants Sequelink-Socket product (since we bought it). So far I could get mxODBC to work with it flawlessy. Now I'm up to integrate it into the ZmxODBC DA published some days ago at zope.org. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Month number as string as variable
Hi, "Williamson, Aaron" wrote: Peter, Try this bit of mojo here: dtml-let monthnr="_.DateTime().mm()" # actually, it schould be: dtml-let monthPoll="'month_%02d' % monthnr" # to produce 'month_01' to 'month_12' dtml-var monthPoll /dtml-let /dtml-let Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] tree plus/minus url
Hi, Ragnar Beer wrote: Too late, I already posted it before I went on holiday :( May be its possible to update the posting? Ragnar Ragnar Beer wrote: I found quite an easy solution for Zope 2.1.6: In lib/python/TreeDisplay/TreeTag.py you have to replace the "old code" with the "new code". (Blame me - I forgot to make a copy beforehands which keeps me from using diff.) The idea is to "export" the piece of code that puts together the url to treeData['tree-item-clickurl'] so that you can access it with dtml-var tree-item-clickurl within your tree-tag. I haven't checked this for unwanted side effects. Perhaps someone more familiar with the zope code could do that? For me it works fine! Would you mind including an alias for tree-item-clickurl which reads tree_item_clickurl before posting it to the collector? I hope we can make all this ugly hypenation variables go away someday... Regards Tino Wildenhain _[_['sequence-item']] avoidance taskforce. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Changing a Z object's __class__ dynamically
hi ... I don't know what exactly is going on. My conjectures are: (1) Digicool people have re-written Python's system function setattr(), so that when it is an Z Object, the __class__ cannot be changed. (2) Caching: when I change the class of a Z Object, somehow it does not reflected in the Z Object's memory-cached version. When I remember correcly, DC's setattr does not change attributes with leading underscore in a persistence way. These attributes are considered to be local. Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-comment doesn't?
Hi, Chris Withers wrote: Hi, Is is just me or does stuff inside a dtml-comment get parsed? So if you have: dtml-comment ... some syntactically bad dtml ... /dtml-comment You still can't save the page 'cos the the parser throws up an error. That seems silly to me. Anyone else agree? No, I disagree. Why do you want bad dtml even inside comments? dtml-comment is a tag like all the other tags. It does not control the parser. One advantage is, you may nest comment-tags. Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] how to generate a Vcard ?
Hi, Didier Georgieff wrote: HEllo, I'm looking for providing a way to generate a vcard for desktop adressbooks. I guess someone already thought about that but i can't find anything on zope.org or mail archive. Any tip out there ? Just send your self a vcard and look at the text... (The plain message of course) HTH Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zeo and rdb backend
"Bak @ kedai" wrote: "Bak @ kedai" wrote: BTW, site summary doesnot work with zeo. i can vview an instance fine on the machine that server Data.fs, but not on the other machine. what should we look out for when considering zeo? boy, am i talking to myself a lot. another follow up. as always, right after i sent a distress signal to the list, i got enlightened. i missed all my external progs when i installed the other machine. so, in the hopes of not showing how dense i am ;), in conclusion -get a mirror copy of your working site - products, external methods, etc -change host for connectiing to SQL backend. use ip, not localhost Better: use hostname, not localhost-alias or ip. So you can assign this Hostname on the local machine with 127.0.0.1 and on the remote machine with the network interfaces ip-address. Just for performance... -make sure access are granted for all machines wanting to access the sql backend -to minimize error, make changes from one machine only. I have to look further, but I think a good solution for local configuration issues would be a mountable database for specific sections (like products and some folders with database-connections and such) Imagine a situation where different instances of zope, connected via zeo have to use different database-connections (odbc for windows, any other for unix). Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] tree plus/minus url
Ragnar Beer wrote: I found quite an easy solution for Zope 2.1.6: In lib/python/TreeDisplay/TreeTag.py you have to replace the "old code" with the "new code". (Blame me - I forgot to make a copy beforehands which keeps me from using diff.) The idea is to "export" the piece of code that puts together the url to treeData['tree-item-clickurl'] so that you can access it with dtml-var tree-item-clickurl within your tree-tag. I haven't checked this for unwanted side effects. Perhaps someone more familiar with the zope code could do that? For me it works fine! Would you mind including an alias for tree-item-clickurl which reads tree_item_clickurl before posting it to the collector? I hope we can make all this ugly hypenation variables go away someday... Regards Tino Wildenhain _[_['sequence-item']] avoidance taskforce. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help!! RE:mutilple select forms and ZSQL Method
Erik Lacson wrote: We are trying to insert an values from a multiple select form into an SQL Database. Does anyone know how to handle arguments of type 'list' inside an SQL Method ? You could use dtml-in over the argument or dtml-var "_.string.join(argument),' something between the values in the statement') ... But note, there might be anything inside the variable which would not be properly sql-quotet this way. Can be very securety riscy. Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Case sensitivity
Hi, Ian Sparks wrote: One of my pet peeves with web servers is that : mysite.com/Members is different to : mysite.com/members (but there is no difference between MYSITE.COM and mysite.com) is there any way of making Zope case-insensitive? Most web-servers are case-sensitive. So where is the problem? You only have to type your links carefully, what is somewhat simplyer with dtml-var object url Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zope crawls - the day after
"Bak @ kedai" wrote: hi all zope is faster now. i think i know why, just wanted some confirmation from the zopistas. setup: apache in front of zope on a rh 6.1 linux what happened: -got a lot of simultaneous connect in one time. whe the number of connect exceeds 200, zope started slowing down. and i mean really slow. -tried putting squid in front, still not much improvement. -set up cache headers again. i did this earlier on, but was not successful. now: -got less then 100 simultaneous connect. zope runs beautifully. what i think that solved this: -setting the cache headers. at first, i put the headers in standard_html_header, before any html documents. later, i put it after headtitle tags. and i think i can see the cache headers on. HTTP/1.1 200 OK Date: Tue, 11 Jul 2000 09:15:33 GMT Server: Apache/1.3.12 (Unix) (Red Hat/Linux) mod_fastcgi/2.2.4 (mod_pcgi2/1.0.1; PCGI/2.0a5) PHP/3.0.12 Cache-Control: must-revalidate,max-age=120 Expires: Tue, 11 Jul 2000 09:17:06 GMT X-Powered-By: Zope (www.zope.org), Python (www.python.org) Content-Length: 14508 Last-Modified: Mon, 10 Jul 2000 16:24:22 GMT Content-Type: text/html so, i guess, it does matter where you put the cache headers. is there a limit on how many simultaneous connect zope can handle? apache ( i know it's different) can handle much higher traffic with not much complaints. Uhm. Headers are headers, not content. As example, image files have headers too but no HTML inside. So you should set headers with RESPONSE.setHeader() hth Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] space in variable returned by queries
Vanfleteren Francois wrote: Hello, I'm working with Zope and PostgreSQL When i do a query, Zope returns me a variable with a space at the end Do you know how i can do not to have this space at the end? dtml-var "_.strip(var_with_space_at_the_end)" should do. Or dtml-call "REQUEST.set('var_without_space_at_the_end',_.strip(var_with_space))" HTH Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] LoadSite can create a corrupted data.fs ?
Hi Jonathan, Jonathan Desp wrote: Hi, Do you have any tools for analyse a data.fs ? (not tranalyser) I'm still getting that problem: http://lists.zope.org/pipermail/zope/2000-July/028950.html If I don't fint out why my data.fs is corrupted, I'll lost one week of work for my company. Why dont you simply restore your Data.fs from a regular backup? Regards Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] just html, help, help, help !!!
Hi, Just some hints: think about it is really necesary to use JS here. Often it does not add comfortableness for the user. If it really brings gain in functionallyty, it schould work both ways, with and without JS. In the example below, a ular reform in the parent can be used. In a Zopish way, you would take an extra submit button (or image) to open a new part of the page to input the needed information. HTH Tino Wildenhain Marcel Preda wrote: - Original Message - From: Vincent Maton [EMAIL PROTECTED] To: Zope [EMAIL PROTECTED] Sent: Monday, July 10, 2000 11:10 AM Subject: [Zope] "just html", help, help, help !!! Hello, Can you help me ??? I have one page with a "form", in this page I have an "OnClick" who open a new page who have some informations and when I "Submit" (I think that I must use a form also in this page to send the informations to the first page), I want to receive the informations on the first page, in a input or something else ??? We are three people for find the answer but we don't find the way, this is why I call you... The key is `opener' propery of `window'object (browser must be capable JavaScript 1.1) I have tested it - just for you :) - with IE5 and NN4.61 Just a draft: The parent HTML: HTML BODY FORM NAME=aForm INPUT TYPE=TEXT VALUE="DEFAULT" /FORM A HREF="anInvalidLink" OnClick="window.open('child','childWindow');return false;"A link to a child/a /BODY /HTML The child: HTML BODY SCRIPT function setInParent(aString) { window.opener.document.forms[0].elements[0].value=aString; } /SCRIPT FORM NAME=childForm OnSubmit="setInParent(document.childForm.elements[0].value)" INPUT TYPE=TEXT VALUE="DEFAULT_CHILD" INPUT TYPE=SUBMIT /FORM /BODY /HTML PM ___ "Will I be using Python today?" and if the answer is "yes" I know that it's going to be a good day. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )