RE: [Zope-dev] Rendering of objects in DTML
> Bjorn Stabell wrote: > > Hello, > > > > When a content is rendered by the Zpublisher, its index_html() is > > called. When it is rendered in DTML, e.g., as content>, its > > __call__ method is called. The __call__ method is also > called if the > > object appears in or . Is it > > possible to render these two cases differently from > content>? > > Which two cases? > What do you mean by 'differently'? > > cheers, > > Chris I would like ... to call different functions. The first renders the object, the second returns a mapping of the content's attributes/properties, the third checks for "trueness" of the content. Rendering a content could be an expensive operation and I don't want to do it when doing dtml-with and dtml-if. ___ 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] Can I run 2 zope servers on one machine?
Yes, I do it all the time, as a Zope-hosting ISP. 1. You can forgo FTP (-f -) and just run HTTP, on different ports. 2. You can use the -f option to Z2.py and run FTP on a different IP address or port. 3. You can run HTTP only via some flavor of CGI, and then use Apache to map portions of the URL space to different servers, Zope or non-Zope. This retains a single-webspace appearance to outside clients. 4. You can also do (3) using the proxy features of Apache. The weak spot is always FTP, which doesn't support virtual hosting or URL/filesystem space splicing, whereas Apache does do both. -Jeff Tena Sakai wrote: Folks, Can I run 2 zope servers on one machine? I have a machine that runs zope 2.5.1. I want to run zope 2.6 on the same machine without taking 2.5.1 down. Is this possible? 2.5.1 runs on port 7117 and I chose 7118 for 2.6. port. What I got was: 2003-01-13T14:39:44 PANIC(300) z2 Startup exception Traceback (innermost last): Module __main__, line 726, in ? Module ZServer.FTPServer, line 602, in __init__ Module ZServer.medusa.ftp_server, line 727, in __init__ Module ZServer.medusa.asyncore, line 306, in bind error: (125, 'Address already in use') Would it be possible to run 2.6 on port 7118 and specify that ftp for this zope server to use a specific ftp port? [I'm just mumbling... In the file ZServer/medusa.ftp_server there is a definition of port=21 (line 701). What happens if I hack this and put some big number like 9221 instead?] Regards, Tena Sakai ___ 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] Can I run 2 zope servers on one machine?
This is a question better served on the [EMAIL PROTECTED] mailing list. But to answer your question, z2.py (executed by the 'start' script) has many configuration options dealing with ports. It's generally easiest to use the -P switch, like -P 9100 - that runs HTTP on 9180 and FTP on 9121. The options are: -P [ipaddress:]number Set the web, ftp and monitor port numbers simultaneously as offsets from the number. The web port number will be number+80. The FTP port number will be number+21. The monitor port number will be number+99. The number can be preeceeded by an ip address follwed by a colon to specify an address to listen on. This allows different servers to listen on different addresses. Multiple -P options can be provided to run multiple sets of servers. -w port The Web server (HTTP) port. This defaults to %(HTTP_PORT)s. The standard port for HTTP services is 80. If this is a dash (e.g. -w -), then HTTP is disabled. The number can be preeceeded by an ip address follwed by a colon to specify an address to listen on. This allows different servers to listen on different addresses. Multiple -w options can be provided to run multiple servers. -W port The "WebDAV source" port. If this is a dash (e.g. -w -), then "WebDAV source" is disabled. The default is disabled. Note that this feature is a workaround for the lack of "source-link" support in standard WebDAV clients. The port can be preeceeded by an ip address follwed by a colon to specify an address to listen on. This allows different servers to listen on different addresses. Multiple -W options can be provided to run multiple servers. -f port The FTP port. If this is a dash (e.g. -f -), then FTP is disabled. The standard port for FTP services is 21. The default is %(FTP_PORT)s. The port can be preeceeded by an ip address follwed by a colon to specify an address to listen on. This allows different servers to listen on different addresses. So if you want to run your Zope 2.6's FTP on 7119 and HTTP on 7118, you could add the parameters to the start script (or when you started up): -w 7118 -f 7119 On Monday, January 13, 2003, at 04:38 PM, Tena Sakai wrote: Folks, Can I run 2 zope servers on one machine? I have a machine that runs zope 2.5.1. I want to run zope 2.6 on the same machine without taking 2.5.1 down. Is this possible? 2.5.1 runs on port 7117 and I chose 7118 for 2.6. port. What I got was: 2003-01-13T14:39:44 PANIC(300) z2 Startup exception Traceback (innermost last): Module __main__, line 726, in ? Module ZServer.FTPServer, line 602, in __init__ Module ZServer.medusa.ftp_server, line 727, in __init__ Module ZServer.medusa.asyncore, line 306, in bind error: (125, 'Address already in use') Would it be possible to run 2.6 on port 7118 and specify that ftp for this zope server to use a specific ftp port? [I'm just mumbling... In the file ZServer/medusa.ftp_server there is a definition of port=21 (line 701). What happens if I hack this and put some big number like 9221 instead?] Regards, Tena Sakai ___ 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 )
[Zope-dev] Can I run 2 zope servers on one machine?
Folks, Can I run 2 zope servers on one machine? I have a machine that runs zope 2.5.1. I want to run zope 2.6 on the same machine without taking 2.5.1 down. Is this possible? 2.5.1 runs on port 7117 and I chose 7118 for 2.6. port. What I got was: 2003-01-13T14:39:44 PANIC(300) z2 Startup exception Traceback (innermost last): Module __main__, line 726, in ? Module ZServer.FTPServer, line 602, in __init__ Module ZServer.medusa.ftp_server, line 727, in __init__ Module ZServer.medusa.asyncore, line 306, in bind error: (125, 'Address already in use') Would it be possible to run 2.6 on port 7118 and specify that ftp for this zope server to use a specific ftp port? [I'm just mumbling... In the file ZServer/medusa.ftp_server there is a definition of port=21 (line 701). What happens if I hack this and put some big number like 9221 instead?] Regards, Tena Sakai ___ 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 and Python compatibility
> FYI, the current CVS head (to be 2.7) now requires 2.2.2 as per an > earlier papal edict. So there will be at least some work involved in > making it run under 2.1.3. I know. It's not much work, and I have already volunteered to do it. Jim has explicitly undone that decision and told me it's Brian's call now. > I kindof feel like we already made a rather firm commitment to > *requiring* 2.2.x. I did not fully agree with that decision at the > time, but to renig on it now seems fairly counterproductive unless > someone can provide a really good reason. I also did not agree at the time. I don't see how it can be counterproductive to change a broken decision. > I personally feel like Zope should run on 2.2.x whether required or > not. Requiring 2.2.x does have the advantage of limiting the > possible blessed configurations on which Zope will run, thereby > making development, support and bug fixing that much easier. I *also* volunteer to make sure that *to the limits of my knowledge* Zope 2.7 indeed continues to run under Python 2.2.2. > Otherwise I can see having to develop on Python 2.1.x and test on > 2.1.x and 2.2.x. It would be nice not to have to do this when > developing 2.7 only code. I realize that this would be necessary > when backporting things to 2.6. --Guido van Rossum (home page: http://www.python.org/~guido/) ___ 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 and Python compatibility
On Monday 13 January 2003 09:56 am, Guido van Rossum wrote: > > What would the arguments be for sticking with Zope 2.1.3 for Zope 2.7? I > > feel most people want to use the latest and greatest versions, usually... > > Actually, most people don't care about the latest and greatest, and > would prefer tried and trusted. Especially if the latest and greatest > means they have to install more stuff. > > > Or? > > > > Of course, if the requirement could be 2.1.3 *or* 2.2.2, that would > > be nice, but is that realistic? > > In practice, Zope 2.6(.x) already fulfills this requirement, it's only > that ZC doesn't have the resources to guarantee it. I think 2.7 would > be in the same boat. FYI, the current CVS head (to be 2.7) now requires 2.2.2 as per an earlier papal edict. So there will be at least some work involved in making it run under 2.1.3. I kindof feel like we already made a rather firm commitment to *requiring* 2.2.x. I did not fully agree with that decision at the time, but to renig on it now seems fairly counterproductive unless someone can provide a really good reason. I personally feel like Zope should run on 2.2.x whether required or not. Requiring 2.2.x does have the advantage of limiting the possible blessed configurations on which Zope will run, thereby making development, support and bug fixing that much easier. Otherwise I can see having to develop on Python 2.1.x and test on 2.1.x and 2.2.x. It would be nice not to have to do this when developing 2.7 only code. I realize that this would be necessary when backporting things to 2.6. -Casey ___ 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 and Python compatibility
> To: "Lennart Regebro" <[EMAIL PROTECTED]> > cc: [EMAIL PROTECTED] > Subject: Re: [Zope-dev] Zope and Python compatibility > From: Guido van Rossum <[EMAIL PROTECTED]> > Date: Mon, 13 Jan 2003 09:56:23 -0500 > > > What would the arguments be for sticking with Zope 2.1.3 for Zope 2.7? I > > feel most people want to use the latest and greatest versions, > usually... > > Actually, most people don't care about the latest and greatest, and > would prefer tried and trusted. Especially if the latest and greatest > means they have to install more stuff. I disagree. If I wanted to stagnate, I just wouldn't upgrade. Speaking as a joe average user, I'd much rather see forward progress on development. That way, when I do hit a bug with my current (old) version I have somewhere to go. Besides, most systems ship with 2.2.2 right now. Demanding 2.1.3 means installing more stuff for new users, not vice-versa. Right now I'm in a bit of a pickle since our inhouse development is all on 2.2.2. But I'm the sole Zope developer so I have to stick with 2.1.3 (and its weaker error checking). Obviously, they can coexist and that's not a huge problem but it is annoying. I understand that 2.6 runs with 2.2.2... well, that's fine but in the spirit of your comment above: that's a little too far into the realm of the unknown and untested. Without papal blessing, I'm not willing to hack up my 2.6 to run under 2.2.2 and put it into production. There is also the matter of pride. I'd rather have Zope running on the latest and greatest, especially since 2.2 has been out for months now and 2.3 is already alpha. Running under an old version implies that there is something wrong with Python 2.2 or Zope 2.6 that just can't be fixed. ___ 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 and Python compatibility
From: "Guido van Rossum" <[EMAIL PROTECTED]> > In practice, Zope 2.6(.x) already fulfills this requirement, it's only > that ZC doesn't have the resources to guarantee it. I think 2.7 would > be in the same boat. OK, then I would preferr that 2.1.3 should be the officially supported, just like with 2.6, because most people who run 2.2.2 and see that 2.1.3 is required, will try anyway, but if you are on 2.1.3 and see that 2.2.2 is required, you might get cold feet. ___ 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 and Python compatibility
> What would the arguments be for sticking with Zope 2.1.3 for Zope 2.7? I > feel most people want to use the latest and greatest versions, usually... Actually, most people don't care about the latest and greatest, and would prefer tried and trusted. Especially if the latest and greatest means they have to install more stuff. > Or? > > Of course, if the requirement could be 2.1.3 *or* 2.2.2, that would > be nice, but is that realistic? In practice, Zope 2.6(.x) already fulfills this requirement, it's only that ZC doesn't have the resources to guarantee it. I think 2.7 would be in the same boat. --Guido van Rossum (home page: http://www.python.org/~guido/) ___ 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] Rendering of objects in DTML
Bjorn Stabell wrote: Hello, When a content is rendered by the Zpublisher, its index_html() is called. When it is rendered in DTML, e.g., as , its __call__ method is called. The __call__ method is also called if the object appears in or . Is it possible to render these two cases differently from ? Which two cases? What do you mean by 'differently'? cheers, Chris ___ 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 and Python compatibility
Lennart Regebro wrote: Of course, if the requirement could be 2.1.3 *or* 2.2.2, that would be nice, but is that realistic? This would be best and I don't see why it shouldn't happen... cheers, Chris ___ 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] Zope and Python compatibility
What would the arguments be for sticking with Zope 2.1.3 for Zope 2.7? I feel most people want to use the latest and greatest versions, usually... Or? Of course, if the requirement could be 2.1.3 *or* 2.2.2, that would be nice, but is that realistic? ___ 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-dev You can look and feel younger,make 2003 your year
It's true, you know. Zope and python does reduce my rate of new grey hair addition. :-) ___ 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] Rendering of objects in DTML
Hello, When a content is rendered by the Zpublisher, its index_html() is called. When it is rendered in DTML, e.g., as , its __call__ method is called. The __call__ method is also called if the object appears in or . Is it possible to render these two cases differently from ? Regards, -- Bjorn ___ 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 )