[Zope] Unit Testing DTML and ZPT
Is there any standard way of unit testing the two page templating methods in Zope 2? Chris ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Public CVS Zope won't compile (fwd)
OK. I guess I'm an abductee or something. I've successfully checked out and compiled Zope2 twice today on different machines. There is only one difference in what I did from what wasn't working for me on the weekend; today I left off the -z7 option recommended on the Zope.org CVS_Info page. Was this corrupting the download somehow? Thanks for the response, Michel. Chris On Sun, 3 Dec 2000, Michel Pelletier wrote: > > Works dandy here, neither w_pcgi.py or wo_pcgi.py have been modified in > over a year. I agree that the code your traceback reports on line 98 is a > syntax error, but it doesn't match what is on line 98 in the CVS. > > -Michel > > ___ 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] ZSQLMethods
Right, Phil. Mental lapse on my part. The nested dtml-ins will be very inefficient because the select on the whole of table2 in the inner one will be repeated once for each record in table1. I was thinking it would only get executed once. The first solution I offered is better especially if table2 is indexed on id, but you're still executing a repeated query on table2. display record Chris On Mon, 4 Dec 2000, Phil Harris wrote: > Depending on the number of records in the tables this could get *very* slow > *very* quickly. > > Surely the ideal would be to move/copy the tables into the same DB. > > Phil > > - Original Message - > From: "Chris Gray" <[EMAIL PROTECTED]> > To: "Tom Deprez" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, December 04, 2000 3:21 PM > Subject: Re: [Zope] ZSQLMethods > > > > Try something like: > > > > > > > > > > display parts of the two records > > > > > > > > > > This keeps it to two db queries and the join work is done by Zope. > > > > Chris > > > > On Mon, 4 Dec 2000, Tom Deprez wrote: > > > > > Hi Chris, > > > > > > Thanks, is this code still efficient if the tables relate to 1:1 and you > > > need to show a list of all records in a tabulare table? > > > > > > eg key, NAME, ALIAS, > > > > > > where NAME is from database1 and ALIAS is from database2 > > > > > > The code below would impact that for every record in database1, I've to > > > query database2 > > > Is there another way to do this? (more efficient?, ie less database > query) > > > > > > Tom. > > > > > > - Original Message - > > > From: "Chris Gray" <[EMAIL PROTECTED]> > > > To: "Tom Deprez" <[EMAIL PROTECTED]> > > > Cc: <[EMAIL PROTECTED]> > > > Sent: Monday, December 04, 2000 3:45 PM > > > Subject: Re: [Zope] ZSQLMethods > > > > > > > > > > You want something along these lines: > > > > > > > > > > > > > > > > display record > > > > > > > > > > > > > > > > This would be more efficient than pulling out the whole of two tables. > > > > > > > > Chris > > > > > > > > On Mon, 4 Dec 2000, Tom Deprez wrote: > > > > > > > > > Hi, > > > > > > > > > > I'm wondering how the following can be done. > > > > > > > > > > I've 2 databases. I want to do a 'join' with 2 tables, both in a > > > different > > > > > database. > > > > > Is it possible to retrieve data of both tables with a ZSQLMethod and > > > then > > > > > do a programatically join? What's the easiest python way? > > > > > > > > > > Thanks, Tom. > > > > > > > > > > ___ > > > > > 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 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 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] PythonScripts and ExternalMethods
I notice that the CVS tree for Zope2 has incorporated (internal) PythonScripts and gotten rid of (external) PythonScripts. This leaves the old ExternalMethods but without the Bindings tab. Will External Methods eventually include this and present a form for passing argument values when the TryIt tab is used? Chris ___ 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] ZSQLMethods
Just had a few additional points: Should be of course. You'll have problems if columns have the same name in the two tables. You may have to modify ZSQL methods from 'select column_name' to 'select column_name as distinct_name' to get around this. Chris On Mon, 4 Dec 2000, Chris Gray wrote: > Try something like: > > > > > display parts of the two records > > > > > This keeps it to two db queries and the join work is done by Zope. > > Chris > > On Mon, 4 Dec 2000, Tom Deprez wrote: > > > Hi Chris, > > > > Thanks, is this code still efficient if the tables relate to 1:1 and you > > need to show a list of all records in a tabulare table? > > > > eg key, NAME, ALIAS, > > > > where NAME is from database1 and ALIAS is from database2 > > > > The code below would impact that for every record in database1, I've to > > query database2 > > Is there another way to do this? (more efficient?, ie less database query) > > > > Tom. > > > > - Original Message - > > From: "Chris Gray" <[EMAIL PROTECTED]> > > To: "Tom Deprez" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Monday, December 04, 2000 3:45 PM > > Subject: Re: [Zope] ZSQLMethods > > > > > > > You want something along these lines: > > > > > > > > > > > > display record > > > > > > > > > > > > This would be more efficient than pulling out the whole of two tables. > > > > > > Chris > > > > > > On Mon, 4 Dec 2000, Tom Deprez wrote: > > > > > > > Hi, > > > > > > > > I'm wondering how the following can be done. > > > > > > > > I've 2 databases. I want to do a 'join' with 2 tables, both in a > > different > > > > database. > > > > Is it possible to retrieve data of both tables with a ZSQLMethod and > > then > > > > do a programatically join? What's the easiest python way? > > > > > > > > Thanks, Tom. > > > > > > > > ___ > > > > 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 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] ZSQLMethods
Try something like: display parts of the two records This keeps it to two db queries and the join work is done by Zope. Chris On Mon, 4 Dec 2000, Tom Deprez wrote: > Hi Chris, > > Thanks, is this code still efficient if the tables relate to 1:1 and you > need to show a list of all records in a tabulare table? > > eg key, NAME, ALIAS, > > where NAME is from database1 and ALIAS is from database2 > > The code below would impact that for every record in database1, I've to > query database2 > Is there another way to do this? (more efficient?, ie less database query) > > Tom. > > - Original Message - > From: "Chris Gray" <[EMAIL PROTECTED]> > To: "Tom Deprez" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, December 04, 2000 3:45 PM > Subject: Re: [Zope] ZSQLMethods > > > > You want something along these lines: > > > > > > > > display record > > > > > > > > This would be more efficient than pulling out the whole of two tables. > > > > Chris > > > > On Mon, 4 Dec 2000, Tom Deprez wrote: > > > > > Hi, > > > > > > I'm wondering how the following can be done. > > > > > > I've 2 databases. I want to do a 'join' with 2 tables, both in a > different > > > database. > > > Is it possible to retrieve data of both tables with a ZSQLMethod and > then > > > do a programatically join? What's the easiest python way? > > > > > > Thanks, Tom. > > > > > > ___ > > > 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 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] ZSQLMethods
You want something along these lines: display record This would be more efficient than pulling out the whole of two tables. Chris On Mon, 4 Dec 2000, Tom Deprez wrote: > Hi, > > I'm wondering how the following can be done. > > I've 2 databases. I want to do a 'join' with 2 tables, both in a different > database. > Is it possible to retrieve data of both tables with a ZSQLMethod and then > do a programatically join? What's the easiest python way? > > Thanks, Tom. > > ___ > 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 guide to getting CVS version of Zope?
The page you're looking for is http://www.zope.org/Resources/CVS_info. Chris On Mon, 4 Dec 2000, Cymen Vig wrote: > Is there a newbies guide to getting the CVS version of Zope off > cvs.zope.org? I'd like to follow the examples in the Zope Book (draft) but > that is not possible in 2.2.4. > > Thanks, > Cymen Vig > [EMAIL PROTECTED] > > > ___ > 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
Here's a fragment from a table that allows sorting by clicking the header in a dtml method named 'displayTable': ID Product Then feed sort_key into your SQLSelectQuery to use in an ORDER BY clause. select * from table order by You can change the properties of an object in DTML by callling its manage_changeProperties method, for example: 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?) > > thanks, > John Cappelletti > AverStar, Inc. > 1593 Spring Hill Road, Suite 700 > Vienna, VA 22182-2249 > Tel: (703) 827-2606 x 4291 (also, 301 443-7509) > Fax: (703) 827-5560 > > > > ___ > 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] dtml methods and properties
On Mon, 4 Dec 2000, Willem Broekema wrote: > As a DTML method is said to work with the properties of the object it > is called at: > > DTML method "m": > > > /m > displays the date/time when the last change happened to any file > in the root folder This _is_ the folder's bobobase_modification_time you're getting. A folder is largely a container. Aside from creating or deleting it you can only change it by changing what it contains. Changing a folder's properties or deleting a file it contains also updates it's bbb_mod_time. > /m/m > displays last change date/time of method m By calling m/m you've bound m as the client object for the method m. will give you m's id, will give you m's title. DTML Methods are designed to give you access to the attributes of the object they are called on. > Why does the method not display it's modification time on the first > occasion? Or: why does it not give the folder's modification time > on the second occasion? If you make m a DTML Document it will give it's own bbb_mod_time no matter how you call it. Cheers, Chris ___ 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] Public CVS Zope won't compile (fwd)
Did a fresh checkout but "python w_pcgi.py" chokes at: Writing the pcgi resource file (ie cgi script), /home/cpgray/zope_cvs_run/Zope2/Zope.cgi chmod 0755 /home/cpgray/zope_cvs_run/Zope2/Zope.cgi Traceback (innermost last): File "w_pcgi.py", line 111, in ? if __name__=='__main__': main(sys.argv[0]) File "w_pcgi.py", line 109, in main import wo_pcgi; wo_pcgi.main(me) File "/home/cpgray/zope_cvs_run/Zope2/wo_pcgi.py", line 98 import comcontent.main(home, user, group) ^ SyntaxError: invalid syntax Cheers and Beers, Chris ___ 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] Link counter
You want something like this in your linking page: http://www.zope.org/"> OR Go to Zope.org Then you need a 'count_and_pass' DTML Method like: and a ZSQL Method called 'increment' that takes 'target_url' as an argument and increments the count for that URL. Or you can get fancier and use the ZSQL method to record each click through along with date and info like the users IP and the refering page. These last will be in the REQUEST from the linking page. Cheers, Chris On Sun, 3 Dec 2000, Brendon Grunewald wrote: > I have recently been asked by a partner site to provide them with a count of how >many times someone links from my site to theirs. Since there are many ways they could >hyperlink to that site (Squishdot articles, normal links, banner ads etc), is there a >way in zope to keep track or to extract that info? OR am I stuck with the server logs? > > Regards, > Brendon > -- > 70South: the No.1 source for Antarcticles. > For the latest news and views on Antarctica visit : http://www.70south.com > ___ 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] ZopeBook ZCatalog Question
Zope Book - Chapter 9 - 2nd sentence: "You can also use it to search external data such as relational data, files, and remote web pages." Can anyone point me to further information on how to do these things? Thanks, Chris ___ 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] Searching Problem at Zope.org
Search results at Zope.org seem to turn up a number of items with the wrong URL. For instance, a search on ZCatalog returns the How-to on building a searchable job board (http://www.zope.org/Members/mukhsein/job_board_howto) but the link in the search results page is to http://www.zope.org/. A number of results are just linked back to the home page like this. Chris ___ 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] ZMySQLDA installation problem (fwd)
Eric Walstad replied to me off-list with the solution to my problem so I've included it below and I'll copy the zope list since your question makes me think the solution should be made public. Cheers, Chris On Fri, 01 Dec 2000 06:48:26 - Roberto Fernandez wrote: I read you post about ZMySQLDA installation and I'm having the same exact problem, even with Python 2.0. Have you found a solution yet? If so, could you contact me at [EMAIL PROTECTED] Thanks, Roberto Fernandez -- Forwarded message -- Date: Sat, 04 Nov 2000 11:22:26 -0800 From: Eric Walstad <[EMAIL PROTECTED]> To: Chris Gray <[EMAIL PROTECTED]> Subject: RE: [Zope] ZMySQLDA installation problem Hi Chris, I ran into similar errors. Here's the response from Jo Meder that helped me get MySQLDA compiled: Hope it helps! PS, check out the NIP Ltd Mail list archives. They've got a really nice search engine that can help you close in on answers to your questions: http://zope.nipltd.com/public/lists/zope-archive.nsf/$$Search?OpenForm Eric. > I have tried everything that I can think of (& a lot of what some of you > could think of) to get MySQLdb to compile and install. I have had no luck. [...] > > # make > gcc -fpic -g -O2 -I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CO > NFIG_H -I/usr/local/mysql/include -I/usr/include/mysql -c ./MySQLmodule.c > ./MySQLmodule.c: In function `pythonify_row': > ./MySQLmodule.c:238: warning: assignment from incompatible pointer type > ./MySQLmodule.c: In function `pythonify_res_fields': > ./MySQLmodule.c:384: invalid lvalue in unary `&' > ./MySQLmodule.c: In function `STH_fetchdict': > ./MySQLmodule.c:1125: invalid lvalue in unary `&' > ./MySQLmodule.c:1147: invalid lvalue in unary `&' > make: *** [MySQLmodule.o] Error 1 > I suppose line 1125 of mySQLmodule.c is something like: tf = & (mysql_fetch_field_direct(self->res,j)); If this is the case, try applying the following patch to your MySQLmodule.c (this is strictly "works for me"): --cut here- 235c235 < unsigned int *lengths; --- > unsigned long *lengths; 384c384 < tf = &(mysql_fetch_field_direct(res, i)); --- > tf = (mysql_fetch_field_direct(res, i)); 1125c1125 < tf = &(mysql_fetch_field_direct(self->res,j)); --- > tf = (mysql_fetch_field_direct(self->res,j)); 1147c1147 < tf = &(mysql_fetch_field_direct(self->res,j)); --- > tf = (mysql_fetch_field_direct(self->res,j)); -----cut here--- HTH. Jo. // -Original Message- // From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris // Gray // Sent: Saturday, November 04, 2000 10:43 AM // To: [EMAIL PROTECTED] // Subject: [Zope] ZMySQLDA installation problem // // // I'm trying to install ZMySQLDA on Solaris 5.6. Everything seems to be // going fine until make tries to compile the module. Then I get the // following error messages: // // gcc -I/usr/local/mysql/include -I/usr/include/mysql -g -O2 // -I/usr/local/include/python1.5 -I/usr/local/include/python1.5 // -DHAVE_CONFIG_H -c ./MySQLmodule.c // ./MySQLmodule.c: In function `pythonify_row': // ./MySQLmodule.c:238: warning: assignment from incompatible pointer type // ./MySQLmodule.c: In function `pythonify_res_fields': // ./MySQLmodule.c:384: invalid lvalue in unary `&' // ./MySQLmodule.c: In function `STH_fetchdict': // ./MySQLmodule.c:1125: invalid lvalue in unary `&' // ./MySQLmodule.c:1147: invalid lvalue in unary `&' // *** Error code 1 // make: Fatal error: Command failed for target `MySQLmodule.o' // // Anyone know what's going wrong here? // // adTHANKSvance // Chris // // // ___ // 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] context in Python Script
D'oh! Thanks, Michel. That was the problem. Right now bindings all default to blank in a new external script. Cheers, Chris On Tue, 28 Nov 2000, Michel Pelletier wrote: > Chris Gray wrote: > > > > I still can't get external Python Scripts to work as described in the Zope > > Book. I am using the version of Python Scripts from the public > > CVS. Internal Scripts work fine, but I can't seem to use the > > "context" object in an external script. > > > > def tryContext(): > > """tryContext function""" > > return context.objectIds() > > > > gives a NameError on context. > > Look at your 'Bindings' tab. The 'context' binding should be > 'context'. If it's something else (like 'self') then change it. > > Basicly, 'container' should be 'self' and 'context' should be 'context'. > > -Michel > ___ 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] PoPy and Delete results
Thanks for the response, Dieter. For consistency within Zope, an integer result could still be repackaged as a sequence result. For now I can do what I wanted to by: select count(food) from penguins where food='Henri Bergson' (thus getting the number of records about to be affected by a delete as a sequence result) before running: delete from penguins where food='Henri Bergson' Cheers, Chris On Tue, 28 Nov 2000, Dieter Maurer wrote: > Chris Gray writes: > > In psql a delete command returns a count of the number of rows > > deleted. Is this returned result available to a ZSQL method using PoPy or > > PyGreSQL? > I think, Zope should pass integer results from SQL commands. > But I fear, it does not. > > When I looked at the code (quite some time ago), I had the impression, > that Zope does only pass sequence results. Integer results > are translated into 'None'. > > > Dieter > > ___ > 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] context in Python Script
I still can't get external Python Scripts to work as described in the Zope Book. I am using the version of Python Scripts from the public CVS. Internal Scripts work fine, but I can't seem to use the "context" object in an external script. def tryContext(): """tryContext function""" return context.objectIds() gives a NameError on context. -- def tryContext(context): """tryContext function""" return context.objectIds() with the "Try It" tab, no form for passing parameters comes up and the complaint is that the context parameter was omitted from the request. --- to the first example above gives the same NameError on context and to the second example gives "a not enough arguments" TypeError --- It only seems to work when explicitly passing an argument like but I thought that context was supposed to be bound to an object by default as it is with an Internal Script. Cheers, Chris ___ 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] come see new.zope.org
Then try 63.102.49.33. The new name just hasn't propagated to your dnsserver yet. Chris On Mon, 27 Nov 2000, Andy Dawkins wrote: > Ethan > > errr. I have a problem with that address. > > The following error was encountered: > > Unable to determine IP address from host name for new.zope.org > > The dnsserver returned: > > Name Error: The domain name does not exist. > > Cheers > -Andy > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of ethan > > mindlace fremen > > Sent: 27 November 2000 19:51 > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: [Zope] come see new.zope.org > > > > > > Zopatistas! > > > > The cluster is up and running. Please go pound it to see if it breaks: > > > > http://new.zope.org > > > > That lovely color is to remind you that you are *not* at the live site. > > Any changes you make here *will* be lost. > > > > If you have any questions or comments, please email [EMAIL PROTECTED] > > > > A full report on how we did it will be appearing soon after the site > > goes live. > > > > ethan mindlace fremen > > Zopatista Community Liason > > > > > > > > ___ > > 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 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] PoPy and Delete results
In psql a delete command returns a count of the number of rows deleted. Is this returned result available to a ZSQL method using PoPy or PyGreSQL? Cheers, Chris ___ 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] Special behavior or bug?
I've discovered another possible solution to your problem. In a DTML Method change to where foo is the id of a DTML Method. Then within standard_html_header, the variables title and id will refer to foo's id and title. Cheers, Chris ___ 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] PoPy and system tables
I can pinpoint the problem a bit more. select relname, relowner, relpages, reltuples, relhasindex, relisshared, relkind, relnatts, relchecks, reltriggers, relukeys, relfkeys, relrefs, relhaspkey, relhasrules, relacl from pg_class works fine but select reltype from pg_class select relam from pg_class select rellongrelid from pg_class all cause problems and sometimes crash my instance of Zope! These three fields all have the type oid. Apparently PoPy can't handle returned values of this type. Chris On Sun, 26 Nov 2000, Andreas wrote: > Hi, > can anybody out there tell me why this query fails > although PoPyDA is connected as postgres superuser ? > > select * from pg_class > > BTW: when I try this query I get no traceback :-( > > Postgres 7.02 > PoPy 1.4.1 > ZPoPyDA 0.7 > Zope2.1.6 > Linux 2.2.13 > > > -- > _ > Andreas Heckel[EMAIL PROTECTED] > > ___ > 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] Special behavior or bug?
Oops! I spoke way too soon. Try but you can't use it in a header or it will give you the title of the header. You can use the following code in a header: although it is a bit indirect and fragile: it will only work if you want the title of DTML Method 'foo' and it is in folder 'bar' and the URL you use to get it ends '/bar/foo', but it works in a header that is somewhere else. You can modify objectValues to expr="bar.objectValues()" but then it won't work in a header called by methods not in 'bar'. Another possible modification is expr="PARENTS[1].objectValues()". Cheers, Chris On Fri, 24 Nov 2000, Chris Gray wrote: > Sorry, but my understanding (which certainly may be wrong, since I don't > fully grasp the ins and outs of this yet) is that the namespace starts > with the client object to which the method is bound. The attributes (like > title) of the method never get into the namespace. This is part of the > design of DTML Methods; they can be bound to a variety of objects while > still giving full access to the client's namespace. This is why the trick > of calling a DTML Document's title from an embedded DTML header Method > works. The effect you want to achieve depends on this distinction between > DTML Methods and Documents. > > Another way to say this is that the distinction between DTML Documents and > Methods allows a separation of content and logic. Put your content > (including Titles that will be significant to your visitors) in Documents > and your logic in Methods. > > Cheers, > Chris > > On Fri, 24 Nov 2000, Dany Rioux wrote: > > > Chris, I can't change all the other DTML Methods to DTML Docs... I > > would have to have only 1 DTML Method which is unthinkable. > > > > Now, I'm sure there's a way to force what I want to do. Either with a > > REQUEST.set('[calling_document.Title]') or something real :) > > > > Is there such a function? (I'm sorry, I'm still confused on how to > > call things in Zope.) > > > > As for the Ferengi rules of acquisition, at least, I'm pretty sure I'd > > get some profits :) haha But, unfortunately, my ears are not as > > erogenous as the Ferengies. :) > > > > Dany > > > > > Make sure that the standard_html_header is a DTML Method > > > and not a DTML > > > Document. Make sure that the calling document is DTML > > > Document and not a > > > DTML Method and it should work. That way the header > > > acquires the title of > > > the calling document. If the calling document is a DTML Method, it > > > acquires it's title from somewhere else according to the > > > Zope rules of > > > acquisition (as opposed to the Ferengi rules of acquisition ;). > > > > > > Cheers, > > > Chris > > > > > > > > > On Fri, 24 Nov 2000, Dany Rioux wrote: > > > > > > > Hi, yeah, I know, it's me again :) > > > > > > > > I've got this snippet in the standard_html_header hoping it would > > > > display the title of the calling document but instead displays the > > > > index_html's title... Is this the normal behavior? I know > > > yesterday it > > > > was working... I tried refreshing the page but it's a no > > > go. It simply > > > > refuses to put the correct title. It doesn't even put the header's > > > > file title... (something I guessed it would do the first > > > time I tried > > > > it) > > > > > > > > Any opinion on that? > > > > > > > > -- > > > > > > > > > > > > > > > > -- > > > > > > ___ > > 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 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] ZopeBook - URL to SQL
Dieter, Thanks, you've added a new room to my brain :) Possibly that point should be made in The Book since the discussion of Pluggable Brains comes at the end of the chapter. Cheers, Chris On Fri, 24 Nov 2000, Dieter Maurer wrote: > Chris Gray writes: > > The Zope book discusses calling a ZSQL Method via a URL, saying that a > > request for a URL like: > > > > http://localhost:8080/zsql_method/parameter/value > > > > "will return a result object", but what I get is the index_html document > > at the root, although I do get a rendered record with: > The ZPublisher works as follows: > > It traverses the ZODB guided by the components in your URL. > It it arrives at the URL's end, it checks whether the > reached object is callable (this is the case for all > kinds of methods and documents). If it is, the object > is called. > If it is not, ZPublisher checks, whether the object > has (or can acquire) a method "index_html" > (this usually is the case). It then calls this method. > > In your case: > > ZPublisher will reach the result object (as the Zope book > describes). Unless you have wrapped this object > into a custom class (aka brain, see "Advanced" tab), > this is a "Record" object. > A "Record" object is not callable. > "index_html" is looked for, found in a folder above and > rendered. > > That's what you see. > > What can you do? > > Wrap you results into a custom brain that either > defines a "__call__" (that would need to be a > Python defined class) or an "index_html" (this > may be a non-persistent ZClass). > > > Dieter > ___ 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] Special behavior or bug?
Sorry, but my understanding (which certainly may be wrong, since I don't fully grasp the ins and outs of this yet) is that the namespace starts with the client object to which the method is bound. The attributes (like title) of the method never get into the namespace. This is part of the design of DTML Methods; they can be bound to a variety of objects while still giving full access to the client's namespace. This is why the trick of calling a DTML Document's title from an embedded DTML header Method works. The effect you want to achieve depends on this distinction between DTML Methods and Documents. Another way to say this is that the distinction between DTML Documents and Methods allows a separation of content and logic. Put your content (including Titles that will be significant to your visitors) in Documents and your logic in Methods. Cheers, Chris On Fri, 24 Nov 2000, Dany Rioux wrote: > Chris, I can't change all the other DTML Methods to DTML Docs... I > would have to have only 1 DTML Method which is unthinkable. > > Now, I'm sure there's a way to force what I want to do. Either with a > REQUEST.set('[calling_document.Title]') or something real :) > > Is there such a function? (I'm sorry, I'm still confused on how to > call things in Zope.) > > As for the Ferengi rules of acquisition, at least, I'm pretty sure I'd > get some profits :) haha But, unfortunately, my ears are not as > erogenous as the Ferengies. :) > > Dany > > > Make sure that the standard_html_header is a DTML Method > > and not a DTML > > Document. Make sure that the calling document is DTML > > Document and not a > > DTML Method and it should work. That way the header > > acquires the title of > > the calling document. If the calling document is a DTML Method, it > > acquires it's title from somewhere else according to the > > Zope rules of > > acquisition (as opposed to the Ferengi rules of acquisition ;). > > > > Cheers, > > Chris > > > > > > On Fri, 24 Nov 2000, Dany Rioux wrote: > > > > > Hi, yeah, I know, it's me again :) > > > > > > I've got this snippet in the standard_html_header hoping it would > > > display the title of the calling document but instead displays the > > > index_html's title... Is this the normal behavior? I know > > yesterday it > > > was working... I tried refreshing the page but it's a no > > go. It simply > > > refuses to put the correct title. It doesn't even put the header's > > > file title... (something I guessed it would do the first > > time I tried > > > it) > > > > > > Any opinion on that? > > > > > > -- > > > > > > > > > > > > -- > > > ___ > 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] Special behavior or bug?
Make sure that the standard_html_header is a DTML Method and not a DTML Document. Make sure that the calling document is DTML Document and not a DTML Method and it should work. That way the header acquires the title of the calling document. If the calling document is a DTML Method, it acquires it's title from somewhere else according to the Zope rules of acquisition (as opposed to the Ferengi rules of acquisition ;). Cheers, Chris On Fri, 24 Nov 2000, Dany Rioux wrote: > Hi, yeah, I know, it's me again :) > > I've got this snippet in the standard_html_header hoping it would > display the title of the calling document but instead displays the > index_html's title... Is this the normal behavior? I know yesterday it > was working... I tried refreshing the page but it's a no go. It simply > refuses to put the correct title. It doesn't even put the header's > file title... (something I guessed it would do the first time I tried > it) > > Any opinion on that? > > -- > > > > -- > > ---.oo0O--O0oo. > > Dany RiouxUnderSoft Inc. > Business > www.dating-reviews.com > [EMAIL PROTECTED] > > Personal > www.drioux.com > [EMAIL PROTECTED] > > ---.o00O---O00o.--- > ___ 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] Problem with 2.2.4b1
Yes it happens for me too and it comes and goes as you describe. Also I've noticed it in Mozilla as well as IE5.5. Chris On Fri, 24 Nov 2000 [EMAIL PROTECTED] wrote: > I installed 2.2.4b1 over 2.2.3, and everything seems to work fine, but, when > I IE5.5 to manage my sites, I loose some icons and graphics (not all!). > But, if I clear my cache, The icons reappears, but only for a while! Am I > the only only experiencing this problem? > > Jean-François Ménard > Intranet DPAS > Pratiques d'affaires et orientations > *(514) 840-3000 poste 3939 > * (514) 840-5585 > * [EMAIL PROTECTED] > * 855 Ste-Catherine est, 6e étage > Montréal, Qué. H2L 4P5 > > > ___ > 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] ZopeBook - URL to SQL
The Zope book discusses calling a ZSQL Method via a URL, saying that a request for a URL like: http://localhost:8080/zsql_method/parameter/value "will return a result object", but what I get is the index_html document at the root, although I do get a rendered record with: http://localhost:8080/zsql_method/parameter/value/dtml_method Am I supposed to be getting something like I do with: and why am I not getting it? Cheers, Chris ___ 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 with Microsoft Access
Here's a fix. Change the line: to: and change the name of the parameter in your ZSQL method from sequence-item to sequence_item and change the dtml-var tag in the method to . Cheers, Chris On Wed, 22 Nov 2000, Mike Kelland wrote: > What does actually do? Looks like all it would do is > divide by zero which *has* to be some kind of error. The problem, I think, > lies mainly in the arguments being passed to UpdateHours. I have done a > whole slew of tests to show that my if statement works perfectly (the > _.string.find thing seems to return false if it finds the specified sub > string which is odd, but works) and I've actually outputted the correct SQL > in the DTML (ie displayed it within the page) and I've copied and pasted > that SQL directly into a ZSQL Method and ran it on my database and that > works fine. However it seems to do absolutly nothing when I actually > attempt to run everything together and call UpdateHours from the DTML > document. I've played a little with namespace as well, but as I said, I'm > new to all this so there may be an error there. > > Thanks for everyone's insight so far, it's really helpful, and please keep > those suggestions coming! : ) > > Mike Kelland > [EMAIL PROTECTED] > > - Original Message - > From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > To: "Mike Kelland" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Wednesday, November 22, 2000 8:48 PM > Subject: Re: [Zope] Zope with Microsoft Access > > > > You may not be entering UpdateHours. > > > > Try just before the call to UpdateHours. > > Or some other obvious way to know if your entering it. > > > > Here's how I coded the same kind of thing. > > Although I'm reading the Zope book right now to see how I should have done > > it. > > The book is good and I might just learn a better solution than 0/0 :) > > > > --- Part of addContact > > > > > > Name: > > Title: > > Phone: > > > > > > > > > > > > > > > > > > > > ---insertNewContactForm > > > > > > > > > > > > > > > > > > > > > > > > > > --Darrell > > > > > > ___ > > 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 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] Apology
Sorry, My intention was not to annoy Chris Withers or create a headache for him. Really, I'm pretty neutral about any name for any software item. I was just thinking out loud about consistent naming practices in an OO environment. It helps to talk about related things if they have related names. That's the main point I wanted to make. Besides, as a Canadian citizen I'm not bound by any rulings of the Florida Supreme Court :-) Now let's get back to Zoping around. Chris On Thu, 23 Nov 2000, Chris Withers wrote: > To Hamish, the other Chris, and anyone else who's going to jump in on > this. > > To be quite blunt, this has now been _decided_ as I understand it. So > it's pointless to keep arguing and suggesting new and different names. > We now _have_ a president and it's name is 'Python Script' ;-) > > Like it or hate it (I'm pretty neutral about it), it's here to stay, so > lets just get on with using them and making sure they work the way we > want them to. > > cheers, > > Chris (who, for once, won't be following up on this thread...) > > ___ > 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] DTML tags in methods(RE: [Zope] Objection to Python Script Name)
Well, half-and-half (joking/serious, that is). I was in a speculative mood about the extent of the analogies among the different kind of methods. Actually the idea makes a little more sense to me on second thought than it did at first blush. Being able to build a Python Script on the fly might have its advantages. Is eval() allowed in restricted scripts? If not, DTML tags in restricted scripts might make sense. Chris On Thu, 23 Nov 2000, Andy Dawkins wrote: > > BTW, can you use DTML tags in Python Script the same way you use them in > > ZSQL methods? > > > NO! > > Did you honestly need to ask that, or where you cracking a joke? ___ 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] Objection to Python Script Name
Greetings to the Knights-Who-Until-Recently-Said-Python-Methods, On Thu, 23 Nov 2000, Chris Withers wrote: > Chris Gray wrote: > > > > I know, I know. It's a little late to speak up, but I think there is a > > logical objection to this name: inconsistency with "DTML Method" and > > "ZSQL Method". > > These are old, horrible and will hopefully be re-thought and given > different names ;-) Granted. My objection doesn't really apply if the naming of all the standard Zope object classes is up for grabs. If that's where things are headed then it would probably be a good idea to have a set of guidelines for the naming of parts of Zope. Zope should underline its OO nature with consistent naming of related things. > > ZIP Method (Zope Internal Python Method) > > ZoPy Method > > PyZo Method > > ZPython Method > > :-( > > All imply there is soem difference between the Python used by Zope and > any other python ,which isn't, and never should be, the case... But there is a difference for the internal methods (restrictions on security and builtins), as well as similarities with other Zope methods (the way you call it from DTML or via URL). I was thinking of the analogy with ZSQL. BTW, can you use DTML tags in Python Script the same way you use them in ZSQL methods? Cheers, Chris ___ 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] Objection to Python Script Name
I know, I know. It's a little late to speak up, but I think there is a logical objection to this name: inconsistency with "DTML Method" and "ZSQL Method". I think some better options were left off the vote. ZIP Method (Zope Internal Python Method) ZoPy Method PyZo Method ZPython Method I think the name should indicate that it is a type of Zope method and that it is a type of Python function peculiar to Zope. Cheers, Chris ___ 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] Zope Book: Catalog Aware -- Bug?
I've gone through the catalog aware example in the Zope book but there was one small problem. The vocabulary was not being updated until I went in and clicked the update catalog button. Is this a known bug or should I retrace my steps to figure out where I messed up? Chris ___ 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 Access database
Just one point of clarification added below since the original poster seemed confused on this point. Chris On Thu, 23 Nov 2000, Diny van Gool wrote: > At 23:07 22-11-00 -0500, John Cappelletti wrote: > >[...] > >What is the process for connecting to a MS Access database? Can it be > >done? > > Yes, it can. I'm running Zope 2.2.0 on Windows98 with Access97. You'll have > to use the ZODBCDA product. > > In Windows98: > > - Use the Control Panel - ODBC connection - Add a system DNS > - Select the MS Access driver > - Fill in an alias name and select the database you want to use When you "Select" the database in the "ODBC Microsoft Access Setup" dialog box you can point it to an .mdb file anywhere on your system. It doesn't have to be in your Zope directory. > In Zope: > > - Add a Z ODBC database connection > - Select the alias you defined above and Add > > Diny ___ 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 with Microsoft Access
Isn't the problem your else tags? Remove them and I think you'll get the effect you wanted. As it stands the condition: is never true. Chris On Wed, 22 Nov 2000, Mike Kelland wrote: > Hi, this is my first posting to the list, and about my 4th day working with > Zope. I have a bit of a problem. All my code so far is working well. Just > the following section is defying my attempts to make it run. What it does > is to update a field in the database (to allow employees to quickly update > their hours in the hours tracking thing I'm creating) it's complex since > all the employees hours will be listed on one page and will be instantly > updatable (with a select box that allows the choice of +/- (name is > modify and value is either + or - > ) and a text field for entering hours to add or > subtract (name is mod_hours)). > > The code (in the DTML document) is: > > > > > > > > > > > > > > > > > > > > > > and the SQL method UpdateHours is: > > update emp_hours set hours = > > > where > hoursID = ; > > with arguments: sequence-item, myval, mykey > > I've tried everything I can think of but it not only refuses to do anything, > it also refuses to raise an error. > > If anyone can help out I'd be very grateful. > > Thanks > Mike Kelland > [EMAIL PROTECTED] > > > ___ > 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] Multiple ZODBC sources
Another thing that would work: display record Chris On Wed, 22 Nov 2000, Phil Harris wrote: > Link the SQL table into Access and then use both from Zodbcda connected to > Access. > > hth > > Phil > - Original Message - > From: "Capesius, Alan" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, November 22, 2000 3:56 PM > Subject: [Zope] Multiple ZODBC sources > > > > I need to join tables from two ODBC sources, one MS Access one SQL. > > > > ZODBC DA seems to be limited to one data source at a time. Is there any > way > > to join tables from two different sources? > > > > > > Alan Capesius, MCSE+20 > > Technical Support Engineer > > Sysmex Corporation of America > > [EMAIL PROTECTED] > > > > ___ > > 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 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] Multiple ZODBC sources
I wonder if something like this would work: display parts of the two records Might be more efficient to make one of the dtml-ins a dtml-with and find the item with the matching id. Interesting problem, I wish I had some time to play around with it. Chris On Thu, 23 Nov 2000, Andrew Kenneth Milton wrote: > +---[ Capesius, Alan ]-- > | I need to join tables from two ODBC sources, one MS Access one SQL. > | > | ZODBC DA seems to be limited to one data source at a time. Is there any way > | to join tables from two different sources? > > Write a method to copy the results from Access into a temporary table of the > other. > > Then do your query and clean up. > > -- > Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton > The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | > ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon > PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| > > ___ > 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] ANNOUNCE: Zope 2.2.4 beta 1 released...
I'm using win98 too. I didn't apply 2.2.4 over my existing installation but did a fresh install and I'm running 2.2.4 at port 9673 instead of 8080. I can access both instances, except for the problem that I noted. The problem does go away if only the 2.2.4 instance is running, but in the past I've run two instances of Zope without mutual interference. Chris On Tue, 21 Nov 2000, jimbo wrote: > I'm using win98. > I applied the 2.2x-2.4 upgrade over my existing zope installation and I'm not having >a problem with /manage. > Can you give a few more details? > -Jimbo > > > ___ > 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] ANNOUNCE: Zope 2.2.4 beta 1 released...
There's a bit of odd behavior, at least in the Windows binary release. Going to any /manage URL brings up a blank page in the workspace ("manage_main") frame. The workspace only appears when you click on something in the navigator ("manage_menu") frame. ___ 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] chapter 5 Zope book - problems with the examples
Make sure that all three objects (navigation, standard_html_header, and index_html) are DTML Methods and _not_ DTML Documents. If they are documents objectValues list the folders they contain (none) rather than the folders contained by the folder you call the method on. If any of these are Documents instead of Methods you need to replace "objectValues('Folder')" with something like "PARENTS[0].objectValues('Folder')". Chris On Thu, 16 Nov 2000, Lee Reilly CS1997 wrote: > Hi, > > I'm going through the examples in Chapter 5 of the Zope book and am > having some problems. For those of you familiar with it, it is the 'Zope > Zoo' example. > > Can anyone help me out? > > 1 - I create a DTML method called navigation as follows: > > > > > > > > 2 - On viewing this method it works fine - a hyperlink to all > sub-folders appears in the browser. > > 3 - I add '' into my standard_html_header so it > reads: > > > > ZAPHOD - zopetastic! > > > > > If your name is Lee then click here to > login. > > > > 4 - On viewing index.html (containing header & footer) everything except > the navigation method appears. Viewing the source of index.html reveals > that the tags are created... just no elements. > > 5 - The HTML is fine... all tags closed & in te right place. > > Can anyone see a problem? > > Thanks in advance for any replies. My appologies also for such a long > post. > > - Best regards, > Lee Reilly > > ___ > 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] ZMySQLDA installation problem
I'm trying to install ZMySQLDA on Solaris 5.6. Everything seems to be going fine until make tries to compile the module. Then I get the following error messages: gcc -I/usr/local/mysql/include -I/usr/include/mysql -g -O2 -I/usr/local/include/python1.5 -I/usr/local/include/python1.5 -DHAVE_CONFIG_H -c ./MySQLmodule.c ./MySQLmodule.c: In function `pythonify_row': ./MySQLmodule.c:238: warning: assignment from incompatible pointer type ./MySQLmodule.c: In function `pythonify_res_fields': ./MySQLmodule.c:384: invalid lvalue in unary `&' ./MySQLmodule.c: In function `STH_fetchdict': ./MySQLmodule.c:1125: invalid lvalue in unary `&' ./MySQLmodule.c:1147: invalid lvalue in unary `&' *** Error code 1 make: Fatal error: Command failed for target `MySQLmodule.o' Anyone know what's going wrong here? adTHANKSvance Chris ___ 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 )