Re: [Zope] 2.3 PythonScripts problem...
On Monday 29 January 2001 20:45, Dario Lopez-Ksten wrote: are you using Internet Explorer to manage your site? No.. I am using Netscape 4.76 under Linux We've had several problems where, in IE, Zope redirects evrything to index_html. We are forced to use Netscape to manage our sites. Is this your case too? We have this problem with 2.2.4, 2.2.5. I never used PythonScripts under 2.2.x, only PythonMethods. /dario Curtis. ___ 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] Did I miss some major change in Z SQL Methods ?
On Thursday 25 January 2001 21:29, peter bengtson wrote: Curtis, Doing Z SQL Methods (SELECT) is really easy with DTML. When you've got a working example of it in DTML, then we can perhaps help you to convert that into Python Method code. Cheers, Peter Peter, Please, do not mistake me for a newbie. I have been developing ZOPE applications for around a year now. This time, however, I have decided to try to use Python, instead of doing the entire app in DTML. People say this is a 'Bad Thing(tm)'. The SQL Method works fine. I can easily test that with the 'Test' tab. Really, the only difference now to how I would have previously done this is that I have the python method slicing the result for me. That being said, I have tried removing that, and going to the Z SQL method directly, and it STILL doesn't work. I fear that something is getting lost in the Acquisition... Have a better one, Curtis Maloney. ___ 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] Did I miss some major change in Z SQL Methods ?
On Monday 29 January 2001 10:19, Fred Yankowski wrote: I missed the original message, but I'm trying to do something similar -- use Python Methods rather than DTML -- and I found one critical difference just today. Here's an example: I've got an SQL Method called 'select_item' that takes 'item_id' as its only input parameter. I've got a DTML Method 'form_action' that has 'item_id' in its namespace by virtue of being posted from an HTTP form. When I would invoke the SQL method from DTML I could do just dtml-call select_item and the SQL method would get the item_id from the DTML method. But when using a new 'action_script' Python Method (PythonMethod 0.1.7) I have to pass that item_id explicitly from the DTML dtml-call "action_script(item_id)" and action_script itself has to call the SQL method like so self.select_item(item_id=item_id) I don't know why the explicit parameter passing is needed in the latter case (DTML to Python Method to SQL Method) but not in the former (DTML to SQL Method). I'm sure I'm missing some trick. In fact, this aspect of Zope -- when values are passed explicitly and when not -- is a major confusion for me. (And anyone who responds about "Zen" deserves to have the size 12 boot applied.) The way it appears to work is this: DTML will pass it's namespace on implicitly. Python will not. The exact details of what are passed are somewhat of a mystery, true. Rember, of course that dtml-var "method_name()" is a Python expression. As I understand it, the equivalent of: dtml-var method_name as a Python expression is: dtml-var "method_name(_.None, _)" When it comes to Python scripts, yes, you must pass all parameters explicitly. IMHO, this is a good thing in many cases, as it forces you to make sure you are passing the correct values. But I can see how implied values could make life easier... oh well... Have a better one, Curtis Maloney P.S. I'm now moving my application to Zope 2.3 in the vague hope that PythonScripts will handle this problem better. ___ 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] Did I miss some major change in Z SQL Methods ?
Green things, I have a few methods poking about that just don't seem to make sense A Z SQL Method ( Returner.sql.getDetails ) which simply contains: SELECT * FROM Returner WHERE ReturnerID=dtml-sqlvar User type="int" Which returns everything as expected. The I have a Python Method which refers to it, simply wrapping it up, and taking the first (of what should be only one anyway) element. It contains the following: ( Returner.getDetails(self, User) ) return self.sql.getDetails(User=User)[0] Now.. for some reason, the following throws complaints about not being able to find ANY of the fields in the row: dtml-with "Returner.getDetails(Returner, User=12)" dtml-var fieldName /dtml-with Now, previously I've accessed my ZSQL Methods directly from DTML, but this time I was trying to abstract slightly, for various reasons... But this bizarre behaviour has begun. Can anyone explain what I'm missing? Zope 2.2.5 ZMySQLDA 1.2.0 PythonMethods 0.1.7 Linux (RH 6.1 +) Have a better one, Curtis Maloney ___ 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] Did I miss some major change in Z SQL Methods ?
On Thursday 25 January 2001 16:50, Evan Simpson wrote: From: "Curtis Maloney" [EMAIL PROTECTED] A Z SQL Method ( Returner.sql.getDetails ) [snip] dtml-with "Returner.getDetails(Returner, User=12)" dtml-var fieldName /dtml-with You want either: dtml-in "Returner.getDetails(Returner, User=12)" dtml-var fieldName /dtml-in No...if you'd paid attention, the Returner.getDetails() is a python method that calls Returner.sql.getDetails() and does the [0] slicing. Besides, I've also tried ditching the Python Method, and doing the slicing in my DTML, and it STILL doesn't work. This is what has me so confused. Even removing most of the complexity, the problem persists. Cheers, Evan @ digicool 4-am Have a better one, Curtis Maloney ___ 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] Adding users with a PythonMethod
Greetings, I'm trying to add a users from within a PythonMethod. I have searched this list and found examples of how to add via DTML, but they all seem to require REQUEST. I have built a dictionary containing the appropriate keys, and passed that as REQUEST, and the following error occurs: Error Type: KeyError Error Value: SCRIPT_NAME From what I can see of the sources, if you pass a non-None REQUEST to _addUser (via manage_users) it will return manage_main. This seems odd to me, because I can't see how you could pass the user details otherwise. So, what I'm left to conclude is it's easier to add a new user from DTML than it is from a PythonMethod. I hope I'm missing something here... any ideas? Have a better one, Curtis Maloney ___ 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] ZSQL Methods in ZClasses...
Green things, Am I missing something, or should I just simply not be using ZSQL methods in my ZClass? If I try to add one, I get an error about there not being a DB connection object (which makes sense) and won't let me add the object. I was planning on making the constructor find all available DB connections, and make the user select one. Have a better one, Curtis Maloney ___ 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] Stopping a dtml-in
On Thursday 18 January 2001 17:37, Dennis Nichols wrote: At 1/17/01 10:24 PM, Tres Seaver wrote: Some 8 months ago, I thought "break" was missing from dtml-in and wrote to this list. Within hours, clever solutions were suggested, the most impressive of which was Jonothan's patch mentioned above. I'm happy to see Tres saying that he doesn't buy the anti-DTML-scripting sentiment. To me, it makes little sense to create a language and then make it hard to use. Even less so when refusing an offered change that is more of a correction than it is an extension. Now just don't get me started on "_['index-whatever']" :-) Count me as another vote of support. As much as people diss DTML, my first few sites were entirely DTML because, before PythonScripts or PythonMethods, it was the simplest solution when you needed TTW editing. It would take just a little nudge (the sequence-* to sequence_* patch, and perhaps this dtml-break) to make DTML much easier to use. I consider DTML as a relatively unthreatening step for people between newbie status and moving into full Python methods. Now, if you'll excuse me, I've got to go back and start writing my first ZClass... -- Dennis Nichols [EMAIL PROTECTED] Have a better one, Curtis Maloney ___ 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] OT: Browsers
On Thursday 18 January 2001 21:23, Phil Harris wrote: Chris, It's worse, Mozilla 0.7 also has some issues, Mozilla 0.6 is probably the best so far. I use it as my main browser. You might also want to check out the Beonex Communicator (based on Mozilla, but with bug/security fixes) http://www.beonex.com. I tried to find out some months ago which browser people preferred. Since I worked out how to stop the worst memory leak in NS4.x (disable Java script) it has been usable, but I'd rather more... I want to learn CSS, but it's not possible with a browser that is so broken. Mozilla? Just as bad, and even more bloaty. Netscape 6? No better than Mozilla, really... but that's hardly a suprise. Amaya? Wish it handled frames... HotJava? .still waiting.. there's my page! Opera? Almost... almost... Konqeror? Yes... does CSS, HTML (and isn't tollerant of broken HTML), just has a small problem with their Password handling. It's RFC compliant, but not 'user' compliant. (o8 So... I'm still using NS4.75.. and actually thinking IE under Linux wouldn't be such a bad thing... Phil Yours not-throwing-the-baby-out-with-the-bathwater, Curtis Maloney ___ 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 delimiter?
On Thursday 18 January 2001 11:36, Andy McKay wrote: Ive looked through the docs and Im sure I saw once (but cant see it now), some sort of delimiter between SQL statements allowing me to put multiple SQL statements in one SQLMethod. Was I imagining that? -- Andy McKay. dtml-var sql_delimiter Curtis. ___ 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] In desparate need of some help
On Wednesday 17 January 2001 10:40, alankirk wrote: Hi there, i am new to zope and i'm in need of some help. I'm using zope as part of my final year project for university. I am using zope with a database i've constructed using MySQL. I've been having trouble sending queries to MySQL for data from the tables in the DB, instead of the required data i get an error message window appear and my python server crashes(which is running on my machine, by the way i'm using version 2.2.2 of zope on windows ME). Somethimes the error message is blank, other times it's PYTHON15.DLL or MYSQL.DLL when it crashes. Hmm... not sure about this. All I can suggest is you check to see if MySQL or Python have issues with WindowsME... (wow, people actually run that ??:) Also when i submit a query to add data to a table zope returns what appears to be a error message in my browser, which the zope control panel is using, but the data is still added to my DB table. When submitting a query to extract data, if my python server doesn't crash, zope returns the following: Error, MySQL.error: have an error in your SQL syntax near ' '', '', '', 2000 )' at line 3 My first recommendation would be to grab yourself a good book on SQL. O'Reilly Assoc "MySQL mSQL" is a good reference in your case. The problem with your select statement is it is incorrect. It should be in the form: SELECT field list FROM table WHERE fieldcomparisonvalue [AND|OR] fieldcomparisonvalue ... so, in your particular case, I would guess: SELECT * FROM songdetails WHERE fifthFieldName = 2000 --- - SQL used: SELECT * FROM songdetails WHERE( '', '', '', '', 2000 ) I'd be most grateful if you could provide some answers to any of these probelms as soon as you can. Even if you don't know if you could point me in the direction of someone who does. Cheers Alan Have a better one, Curtis Maloney ___ 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] Calling other frames (OT)
On Monday 15 January 2001 22:51, Oliver Bleutgen wrote: I think probably Javascript is the 'cleanest' solution in this case, but depending on the complexity of your UI another non-JS approach is to make every link target the topmost frome (e.g., target="_top") and redraw all frames in the frameset on each 'click'. This way you know that all frames reflect the latest situation, but it can be annoying to see the whole browser redraw every time you do anything. However, if your browser doesn't *do* Javascript (so long as it does do frames hmm.. how likely is that?) then it would at least work There' s always the possibility that people disable javascript - and checking for instance http://www.guninski.com/browsers.html I would say they have reason to do so. Agreed. I run NS4.76 with JavaScript disabled... it's the only way I've found to stop it pissing away my memory. My take is that one should at least provide a non-javascript alternative to browse the site. This also helps with search-engines IMHO, JavaScript should be used to provide faster access to the same interface, but never to add functionality that is not otherwise available. A great example is http://www.asus.com.tw ... they have a side-bar menu which, with JS, will give you sub-menus when you hover over the links, etc. However, if you just click on the link, you are taken to a sub page which has the very same sub-menu, and this happens regardless of JS. cheers, oliver As for this frame problem... seems like you're voiding the best (IMHO) use of frames, which is to prevent reloading of portions of the page. Otherwise I just render all the objects into elements of an 'uber-table'... Have a better one, Curtis Maloney ___ 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] ZServer
On Thursday 11 January 2001 21:13, Tom Deprez wrote: Hi, Can anybody tell me what the following warning means, or where I can find documentation on this warning? Since nobody else has , yet... ZServer warning : server accept() threw EWOULDBLOCK Odd... this is a Sockets level error, meaning that the operation (in this case accept() ) requested on a non-blocking socket would have caused it to block (stall). Thanks in advance Tom Deprez As to what would cause this from the documentation I can find, accept() shouldn't produce this error. And even if it can, it would be a poor program design indeed that called accept() when there were no connections pending. All I can think of immediately is someone went to connect, but dropped the connection before the server could react. Now, the timing we're talking about here is likely _very_ slim... but possible. Other than that, I'd actually have to look at the source.. (o8 Have a better one, Curtis Maloney ___ 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 retrieve the selection list
On Tuesday 09 January 2001 16:01, Angietel wrote: The following is my selection list, where should i put the dtml-var custcountry in order to display the selected result. Ooh... this one hurts.. (o8 You have to put "SELECTED" on the 'option' tag you want to be default. This means iterating over your list with something like: dtml-in CountryList option dtml-if "_['sequence-item']==custcountry" SELECTED/dtml-if value="dtml-var sequence-item"dtml-var sequence-item /dtml-in If you don't already have the country list in an object somewhere, I recommend adding a "lines" type property to either that object, or an appropriate folder, and put them in there. And remember... if "custcountry" doesn't exist.. this will break... do putting a: dtml-unless custcountry dtml-call "REQUEST.set('custcountry',' ')" /dtml-unless at the top of the page won't hurt. select name="custcountry" size="1" tabindex="9" style="HEIGHT: 22px; WIDTH: 293px" option value="."selectedPlease select a country/option option value="Australia"Australia/option option value="Cambodia"Cambodia/option option value="Canada"Canada/option 8 *snip* 8 /select Thank You! Have a better one, Curtis Maloney. ___ 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] Something missing in Python Methods
Greetings Yeh, yeh.. I know.. I should be using Python Scripts, or whatever... but for various reasons, I'm still using 2.1.6... What I want to know is, why can't Python Methods refer to anything not explicitly passed to them? I don't want to have to make everything that invokes the method have to know to pass it half a dozen objects. Isn't the idea of a method to be executed in the namespace of it's parent? I want my method to be able to access objects in it's own folder... What am I missing? Curtis ___ 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] is it possible to import from Excel
On Wednesday 27 December 2000 17:30, K H Subrahmanyan wrote: Hello, Now we have developed some database using gadfly in zope. Actually there are some datum which are there in Excel. I would like to know is it possible to import all that datum from Excel to zope database, instead of giving all the data to zope manually. Actually all those data are the Emp. records. Currently they are maintaining it in Excel. Now they want to make it web based stuff. We have developed a tool for that. Since all that data are there in Excel I wanted some stuff to import that. Hoping your reply. Well... firstly, moving from a spreadsheet to a db is probably a very good move, in the case of employment records. As for how to go about it... I would recommend you export the Excell data in a comma or tab delimited text file, then write a Python Method (or Script, whichever you have) to munge each line and store it in the db. bye yours subrahmanyan. Have a better one, Curtis Maloney ___ 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] next record in IN TAG
On Thursday 28 December 2000 07:17, Anderson Ami wrote: How can I jump to the next record within IN TAG ? Do you mean like a "next" in basic, or "continue" in C? If so, I'm pretty sure there is no such thing, and you just have to synthesize it with dtml-if/dtml-unless tags. Thanks Anderson Have a better one, Curtis Maloney ___ 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] default values in forms
On Thursday 14 December 2000 04:52, Ivan Cornell wrote: Olaf Zanger wrote: hi there, i'd like to send default values for an data update with the link to the form like a href="adr_change_frm?f_id=dtml-var idf_name=dtml-var name"c/a unfortunately name may contain spaces. i found out that spaces may be replaced by "+" in the link, but how do i get the "+" into the dtml-var ... statement? Try a href="adr_change_frm?f_id=dtml-var idf_name=dtml-var name fmt=url_quote"c/a I don't know about you, but this looks messy Yes, It will work, but... a href="dtml-var " 'adr_change_frm?f_id=%sf_name=%s' % ( id, name ) " fmt=url_quotec/a at least, to me, is a fair bit clearer However, the url_quote might not like or ?... but I'm sure this is working in one of my sites currently. Ivan Curtis. ___ 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] Why I Love Zope
(ie going from zero to zen quickly!). You know, this sounds like a great title for a "Learn Zope Quick" book "From Zero to Zen in 15 minutes!" Regards, Ivan It's early monday, ok? Have a better one, Curtis Maloney ___ 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] Comment elimination...
On Thursday 07 December 2000 08:05, Dieter Maurer wrote: Curtis Maloney writes: ... finding objects with "comment" in them You can use the "Find" tab and fill the "containing" field with "comment". slaps forehead duh! I've been ignoring that tab for so long I don't even see it any more. (o8 Yep, this does exactly what I want... thanks. So I take it all the other people want is a 'replace' option added to this ? Dieter Curtis. ___ 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 traceback
On Wednesday 06 December 2000 08:47, Rodrigo Leme de Mello wrote: Hi All, I am trying to install ZMySQLDA and as a result of my installation, i am getting the following traceback ZMySQLDA Import Traceback Traceback (innermost last): File "/home/zope/224/lib/python/OFS/Application.py", line 397, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/home/zope/224/lib/python/Products/ZMySQLDA/__init__.py", line 106, in ? import sys, os, Globals, DA File "/home/zope/224/lib/python/Products/ZMySQLDA/DA.py", line 108, in ? from db import DB File "/home/zope/224/lib/python/Products/ZMySQLDA/db.py", line 106, in ? import _mysql, regex, sys ImportError: No module named _mysql Any help will be welcome You have not installed the Python MySQL module. Depending on which MySQL Zope product you downloaded, this either came with it, or you will have to download it seperately. Last time I installed a fresh Zope/Python combo, I used ZMySQLDA 1.2.0, which comes with the MySQLdb Python module sources. I found it to be a fairly simple and painless install. Previous versions did require you to download the MySQLdb module seperately. Both are on www.zope.org. Regards Rodrigo Have a better one, Curtis Maloney ___ 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] Comment elimination...
Greetings, Whilst developing, i often dtml-comment out some part of a document so I can test an replacement/option/something. Sometimes, due to interruptions or just my poor memory, I don't remove the old code... I was just wondering if there were some convenient way I could search all of my DTML[Documents|Methods] and ZSQL Methods, for comments, so I could review them? Perhaps it's time I learned how to use ZCatalog? Have a better one, Curtis Maloney. ___ 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
On Monday 04 December 2000 17:07, Tino Wildenhain wrote: 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. insert raucous applause here Thank you for finding the time to do what I did not have the time to. (o8 As I have said several times on this list, this is well overdue. Hopefuly the '-' tags can migrate their way out of Zope the way !--# has. 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? I like! I like it a lot! This is, imho, quite an elegant solution to an ugly problem. I know these two were considered 'minor' problems, and thus not given much attention, but they're just one more niggling problem that will no longer elicit the same old newbie questions to this list. Have a better one, Curtis Maloney. ___ 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] Tag attributes...
Green things, I've written a handy tag for my Zope site, and it accepts a few attributes. This is all going well, and the tag is working nicely. (Even though I couldn't seem to find any docs on doing this, I just fumbled about with the source from the sendmail tag) However, it seems there is no way to determine if an attribute is a quoted string, or just a variable name, and the only solution is to provide different attributes depending on how this information is passed. Have I missed something, or is there some hidden feature of 'parse_params' that I'm missing? Have a better one, Curtis Maloney. ___ 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] [Urgent] Zope good for multiprocessor hardware
On Thursday 23 November 2000 18:46, Daniel Dittmar wrote: I don't think Python (and therefor Zope) will profit from a multiprocessor as there is something known as the 'global lock' which prevents more than one Python thread to run at a time. Things look different if you're accessing a database (other than ZODB) because a properly written database module will release the lock while waiting for a reply. So Zope would use one processor and the database the other one(s). Other possibilities: - you have lots of static data, then these could be served by Apache directly (which would benefit from the additional processor) - you have some very expensive operations (generating GIFs from data etc.). Then you could implement those in a separate server. I would have to agree with this. We are currently running Zope on a dual processor Sparc station. However, also on that box is MySQL, and Apache. So, whilst Zope can only use one CPU, there is still plenty of CPU time for the DB and Apache to handle their requests. I've not done any tests, but I can't see how this _wouldn't_ be faster than a single CPU. And, of course, if you happen to be running Linux 2.4 on your system, the multi-threaded IP stack will definitely benefit from the extra CPUs. Have a better one, Curtis Maloney ___ 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: Problems using M18 (and others too!)
On Tuesday 21 November 2000 20:04, Harris Peter wrote: Andreas Tille wrote: I just gived Mozilla M18 a try and noticed that Back Button of the browser doesn't work in zopüe management screen. Netscape 4.75 (and Konqueror doesn't seem to work well with zope either - I sometimes get repeated password prompts, and the management screens don't come up at all - I just see the index_html document instead of the folder contents. I get the same bother with w3m, but not with IE or lynx. If all that's wrong with mozilla is the back button, I'll maybe give it a try. Peter Harris Yeh, I've tried a bunch of browsers over the time I've been using Zope, because Netscape leaks memory (when you have JavaScript enabled and use textareas hmm... why would Zope cause problems? :). Of the Linux versions, I find the following problems : (this is not an extensive list, but the problems make the browser sufficiently difficult to use) Amaya - no real Frames support Opera - some odd problem with forms in frames won't allow you to adjust edit box sizes (for DTML Methods/Documents) Konqueror - seems forgetful of passwords I have used a couple of others (which I can't recall just now) and they still didn't make the grade. so, unfortunately, I'm stuck with Netscape. I'm using 6.0, which seems only a little more bloaty, and a little less responsive, that 4.75. With JavaScript disabled, it doesn't seem to leak memory (I've not been game to try with it enabled, yet :) I know this is often considered an evil thought, but I'd really like IE on my Linux box, or at least something of equal quality. Curtis Maloney ___ 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] Permission problems...
On Tuesday 21 November 2000 10:06, Dieter Maurer wrote: Curtis Maloney writes: I really can't understand this... I am logged in as my normal Manager role user, editing away on my site. In the management section, no problems... I can edit, add and delete to my hearts content. However, when I try the normal view, one a certain page I get permission problems... It won't let me log in with _any_ users, even tho my permissions seem set correctly. The object in question is, in fact, standard_html_header, of all things. With the way the objects are set up, it's only rendering the same objects as from the previous page, with a little extra processing due to submitted form values. This is definitely not enough information. No, you're right.. it's not enough information Either your permissions are strange (you ruled this out) or "standard_html_header" contains something strange that maybe triggers a Zope bug (2.1.6. contained such bug, when you e.g. used 'ZopeFind' or 'ZopeFindAndApply'). As it turns out, I found the problem to be something wholy unrelated to standard_html_header. To be honest, I don't entirely understand the fault, but it's gone away now. Sorry for not posting a retraction to this question. We may help you, if you post your "standard_html_header". Dieter Curtis. ___ 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: ANNOUNCE Zope 2.2.3 release...
On Saturday 18 November 2000 09:07, Joachim Werner wrote: FYI - someone has noticed a problem with the posted 2.2.3 release that needs looking into, so I've unlisted it for the time being. I'll send out a note and re-list it after we dig into this a bit... Oh no, not this one again ... How good that I learned my lesson from the infamous 2.1.x series, when you always replaced or withdrew the latest bugfix release due to "some errors" right after we had updated all our servers ... You mean I'm not the only person who always stays one version behind? (o8 What about having a "beta" phase for every release, even the x.x.x ones? I think this would be a great idea... I don't mean to pry, but what level of regression testing do you guys at DC have in place? Or was this a new bug shown up by fixing others? Cheers, Joachim. Have a better one, Curtis Maloney. ___ 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] Permission problems...
Green things, I really can't understand this... I am logged in as my normal Manager role user, editing away on my site. In the management section, no problems... I can edit, add and delete to my hearts content. However, when I try the normal view, one a certain page I get permission problems... It won't let me log in with _any_ users, even tho my permissions seem set correctly. The object in question is, in fact, standard_html_header, of all things. With the way the objects are set up, it's only rendering the same objects as from the previous page, with a little extra processing due to submitted form values. System: Zope 2.1.6 installed from source. Python 1.5.2 RedHat 6.1 (with many updates) many thanks in advance, Have a better one, Curtis Maloney. ___ 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] Do Zope Haz Templates?
On Wed, 15 Nov 2000, Padrino wrote: I Was Serching And looking For Templates and I Was Guessing if Zope really Has It? DTML. Document Template Markup Language. DTML is Zopes templating language. Look at DTML Documents and DTML Methods. Have a better one, Curtis Maloney ___ 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 access column names in DTML Methods
On Tue, 14 Nov 2000, Jose Soares wrote: Hi all, I'm trying to display the column names of a Record object without success. I'm able to access column data using sequence-item but I don't know how to display column names. Here is some code I use in a production site: dtml-let Fields="sqlQuery().names()" dtml-in Fields do your loop stuff here /dtml-in /dtml-let I only used the dtml-let because I use the list twice... so; dtml-in "sqlQuery().names()" blah /dtml-in should work fine (not testsed.) I believe there is some more detail in what exactly is in an SQL return object (try the ZQR :) Thanks for any help José Have a better one, Curtis Maloney ___ 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] Form variables with same name as folder names
On Tue, 14 Nov 2000, "Burwell, Becky wrote: Hi. I am new to using Zope and just got stuck on the following problem. I am trying to use forms with an SQL database. I have a form with checkboxes and I use variables like FOO to capture the value. For example: input type="checkbox" name="FOO" value="1" The form has a post with the action to call a DTML document. In my DTML document I call a Z SQL Method called InsertMethod with REQUEST as the argument, for example InsertMethod(REQUEST). My Z SQL Method InsertMethod has arguments including FOO="" And then in the body of the Z SQL method I have: dtml-if FOO {code to insert into a database table} This working UNTIL I created a Folder named FOO. Then the value of FOO in the Z SQL method seemed to be the FOO folder and not FOO from REQUEST. My workaround was to call the variable FOOCHECKBOX. 2) is there some way I could have referred to the variable FOO in my Z SQL method without resorting to renaming the variable in my form? A sneaky problem indeed, and once again, one caused by "convenient" shortcuts. (o8 The simple answer: use REQUEST.form['FOO'] to refer to the form variable. The longer answer: To make life simpler on our key-weary fingers, DC made all the form variables part of the namespace, but put then sufficiently down the search path so they wouldn't get in the way of other objects. Most of the time this is just great, but occasionaly you do run into this problem. So, you can explicitly access all form variables with REQUEST.form[]... just as you can access all cookies via REQUEST.cookies[] I would advise you make a small DTML Document containing dtml-var REQUEST just to have a look at what it contains THEN go and check up the ZQR for all the members of REQUEST... and RESPONSE, while you're at it.. (o8 Thanks! *becky* Have a better one, Curtis Maloney ___ 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
On Tue, 14 Nov 2000, Gregory Haley wrote: Andy McKay wrote: BTW: Im not a Unix guru but I dont think having everythin 777 is the most secure way of maintaining your installation... -- Andy McKay, Developer. ActiveState. Hi Andy, actually, if you are talking about permissions, this setting gives anyone in the world read write and execution access to your document(s)/directory(ies). I think you want to set permissions as 755, with owner and group set to nobody (at least for the /opt/zope directory and sub-directories. (allows only owner write access) : ) Yes, I know we've wandered somewhat off topic, but hey... just this once.. (o8 Greg, Having all your dtml, html, py, pyc, doc and other files executable just doesn't make sense! In fact, if you make everything 440 except for in /var, where you make it 640, and owned by a "zope" user, this is the safest. Of course, it DOES mean you have to explicitly chmod any file you want to edit...so if you're not THAT paranoid, you could use 640 everywhere... If you put all the files in a zope group, then you can set the permissions 660, so only people in the Zope group can edit the files. ciao! greg. Have a better one, Curtis Maloney. P.S. sorry for rambling... i've just got into work, and not had my first coffee yet.. (o8 ___ 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] why DTML confusing
On Sat, 11 Nov 2000, Andy McKay wrote: It might be that fixing one or both of the above would reduce the DTML pain factor quite a bit. Certainly, it's time to do whatever it takes to banish these "-"-named variables, IMHO. I agree, changing the "-" to "_" would remove a whole ton of posts on this list and mean I could chop a whole bunch of dtml-let item=sequence-item. I really only see negative reasons for a "-". I've tried starting this call some time ago, but it never managed to pick up steam. Last time, however, someone pointed to an existing patch to do just that: change *-* variable names to *_* . If only I could remember where it was... Have a better one, Curtis Maloney ___ 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] Check for JavaScript:
On Fri, 03 Nov 2000, Oleg Broytmann wrote: On Thu, 2 Nov 2000, Daniel Rusch wrote: Advice: client issues should be dealt with on client side. Great I agree completely, except if the client has Java/JavaScript turned off it is pretty darn difficult to have client issues dealt with on client side!! htmlhead script languagae=javascript window.location = "/site/with/js/" /script meta http-equiv=refresh content="5; url=/site/nojs/" /headbody pLoading, please wait.../p /body/html This is a beautifuly simple solution the only things I could think of to improve it is: 1) comment out your javascript. It's not required, true, but it's a sensible safety measure. 2) put the meta tag in a noscript tag. Again, this is for extra safety... you just never know. (o8 In fact... this is the first time i've seen a META tag usage I condone... otherwise they just seem pointless to me. (o8 Oleg. Have a better one, Curtis Maloney. ___ 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] I need help.
On Wed, 01 Nov 2000, Dylan Chi wrote: Firstly, just so you don't miss it, PLEASE, do NOT send HTML encoded messages to this list. How to change superuser's password in Zope 2.1.4 Linux? I find some document about this problem.But I can't find file:access and zpasswd.py. Anybody can help me? thanks Change to the install directory if Zope, and you will find access and zpasswd.py. zpasswd.py has help in it, so it should be simple enough to figure out something like: python zpasswd.py -u name -p password access should work. Have a better one, Curtis Maloney ___ 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 python 2
On Thu, 26 Oct 2000, Toby Dickenson wrote: Hi all Is anyone using or know the current state of Zope with python 2.0 ? I've been somewhat curious about this myself. The current release of Zope works well on python 2.0. If you are a cautious type, you might not want to use it on a production server yet. (I would certainly recommend you dont if you allow untrusted users to write dtml) Hmm.. well, that's good to know... which products have you tried it with so far? Will there need to be large changes now that strings are proper objects? (the string functions are now methods of strings). If so, will this mean the phasing out of _.string ? _.string is unlikely to go away. String methods are currently inaccessible TTW. The security implications of opening this up have not yet been assessed. And from the looks of things there are a large number of small changes that could be made to improve performance (such as the new 'augmented assignment' operators [ += *= /= and so on] ) It seems likely that they will not be available in dtml (for the same reasons as regular assignment). The case for PythonMethods has not yet been investigated I didn't mean to dtml, I meant to all the Python code underneath. I'm sure you've noticed there is a lot more to Zope than just DTML and Python methods. Toby Dickenson [EMAIL PROTECTED] Have a better one, Curtis Maloney. ___ 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] Not grocking RESQUEST.set syntax
On Thu, 26 Oct 2000, Noah wrote: I'm still not grocking the syntax for setting REQUEST fields. I want to set a REQUEST field "filename" to be the value returned by a ZSQL call. I want something like this (pseudo-code of what I want): dtml-let FOO=MyFavoiteZSQLMethod dtml-call "REQUEST.set('filename', FOO)" dtml-call some_other_thing_that_uses_filename /dtml-let That does not work because FOO gets set to something like: Shared.DC.ZRDB.Results.Results instance at 7760b0 I think your simplest option is to use: dtml-call "REQUEST.set('filenale', MyFavouriteZSQLMethod(_.None, _) )" All that _.Non, _ stuff is the namespace etc that Zope normally passes to your methods. (I don't fully understand it, I just know it works :) I tried sticking this inside dtml-indtml-in to get at the sequence-item, but I just ended up getting confused. Yours, Noah Have a better one, Curtis. ___ 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 python 2
On Thu, 26 Oct 2000, Mark Twiddy wrote: Hi all Is anyone using or know the current state of Zope with python 2.0 ? I've been somewhat curious about this myself. Will there need to be large changes now that strings are proper objects? (the string functions are now methods of strings). If so, will this mean the phasing out of _.string ? Will the new Unicode support, does this mean Zope is now a big step closer to i18n? And from the looks of things there are a large number of small changes that could be made to improve performance (such as the new 'augmented assignment' operators [ += *= /= and so on] ) Thanks Joe watching closely, Curtis ___ 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] New to list Zope
On Tue, 24 Oct 2000, Eileen Orbell wrote: Hi, Greetings, and welcome, new Zopista! I run debian 2.2 and have Zope installed and apache. On bootup my Zope server starts automatic. Always handy. (o8 I am wondering how I configure Zope with an Apache server? I am very very new to Zope so really want a little help in starting off. My network works fine by the way and I use cabke modem with a static IP for my website. Thanks for any help. Right now I only see Zope in my cgi-bin and thought I should have a file zope.cgi? As you can see I am a little lost :-) The way we run it at work is to use ProxyPass in Apache. Check your Apache docs, or even easier is to search for ProxyPass on the Zope web site ( www.zope.com ) Eileen Orbell Software Internet Applications Capitol College mailto:[EMAIL PROTECTED] Don't Fear the Penguin. Have a better one, Curtis Maloney Developer Cardgate.Net ___ 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] IIS and Zope share same problem :-S
On Fri, 20 Oct 2000, Chris Withers wrote: Andrew Kenneth Milton wrote: | http://www.zope.org/standard_html_header for example ;-) Not that old chestnut again... Yes, that old chestnut again. If it's considered a serious security flaw by Microsoft, maybe the Zope community should finally do something to solve it. ...and yes, there are discussions about this on Zope-dev right now, wwhich will hopefully produce a solution :-) Now, I may be missing the point of the fine grained access control of ZOPE, but knowing an objects ID is not at all the same as being able to access it, or even invoke it correctly. The MS bug "allows access to any file on the webserver". Whilst in ZOPE you may be able to enter the URL and invoke the object to some degree, unless you have the permissions to do whatever it does, what harm can you do? To me, this seems like more of a "patch by sensible admin" problem than a security hole. cheers, Chris Have a better one, Curtis Maloney. ___ 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] Problems with sequence-item
On Mon, 23 Oct 2000, Taco Scargo wrote: I get errors when sequence-item is being called to list the contents of a folder E.g. dtml-in "(1,2,3)" reverse dtml-var sequence-item /dtml-in correctly outputs 3 2 1 When I do dtml-in "folder.objectValues()" dtml-var id /dtml-in it correctly outputs all ids in the folder. But dtml-in "folder.objectValues()" dtml-var sequence-item /dtml-in will fail with an error Error Type: AttributeError Error Value: __call__ What am I doing wrong ? Your problem appears to be in the using of objectValues(). This returns the actual objects. So, in the second loop (dtml-var id) you are referencing the 'id' member of each object. Nothing wrong there. However, in the third loop (dtml-var sequence-item) you are trying to render the object itself. This will 'call' each object, which some of them (obviously) object to. (No pun intended) If you want to render all the DTML Documents and DTML Methods in the folder , try something like: dtml-in "folder.objectValues(['DTML Document', 'DTML Method'])" dtml-var sequence-item /dtml-in but this could get very messy with a large folder. (o8 Thanks, Taco Scargo Have a better one, Curtis Maloney ___ 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] Problems with sequence-item
On Mon, 23 Oct 2000, Taco Scargo wrote: Had already tried that, but it doesn't work. I have 8 DTML Documents in a folder called artikelen. dtml-in "artikelen.objectValues('DTML Document')" dtml-var sequence-item /dtml-in Fails with the error: Error Type: AttributeError Error Value: __call__ I am really clueless Any chance you could post the WHOLE traceback, so we might be able to see which object it's choking on? Thanks, Taco Curtis. ___ 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] Why doesn't this method work?
On Fri, 20 Oct 2000, Graham Chiu wrote: I'm still struggling with Tiny Tables. Why does this flag an error?? dtml-call "REQUEST.set('table','thenameofmytinytable')" Here's your problem. You're setting table to be a string containing the name of your tiny table. dtml-call "REQUEST.set('table', thenameofmytinytable)" Why don't you try dtml-call "_.getitem('thenameofmytinytable').manage_editDate(tableDate)" instead? dtml-call "REQUEST.set('tableData',_.chr(34)+'Mydata'+_.chr(34) + '\n')" dtml-call "table.manage_editData(tableData)" Error Type: AttributeError Error Value: 'string' object has no attribute 'manage_editData' This error is the giveaway. table is a "string", not a "tiny table". -- Graham Chiu Have a better one, Curtis Maloney. ___ 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-sqlvar quote
On Fri, 20 Oct 2000, Mark Twiddy wrote: Hi all How can i pass a string to a sql method that won't be quoted. i.e so i can do somthing like this . ggroup by foo,blah order by dtml-sqlvar spam don't use sqlvar... just put: order by dtml-var spam works for me. (o8 thanks mark Have a better one, Curtis Maloney ___ 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] A clarity problem...
Green things, After seeing yet another problem caused by the 'shorthand' of zope (using "foo" to mean expr="foo") I was wondering just how difficult it would be to REMOVE this useful, but confusing, feature. Personally, I don't have a problem with it, any more. But it seems a sizable portion of traffic on this list is because of people who do. (True, it seems to have dropped off in recent weeks... is this because there is better doco, or have newbie numbers dropped?) Even if it were a build time option or something... just rambling... Curtis Maloney ___ 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] 'websafe' colours
On Wed, 04 Oct 2000, Stephan Goeldi wrote: According to a recent study, there are approximately 13 'web safe' colours, out of the full 16,777,216. What makes the other 15,777,203 'unsafe'? If you mean the 'browsersafe colours' then there are 218. Yes, my mistake. I did mean 'browser safe'. I was aware of the previous belief of 216 (mostly because of 256 colour modes less 40 system colours), but as I stated, a recent study has "dispelled the myth", claiming (and now I correct myself :) only 22 browser safe colours. http://slashdot.org/articles/00/09/08/1622204.shtml has some more details, and a link to the actual article. The only other possible reason I can recall is that some of the 'named' colours are not supported by all browsers, or are not interpreted the same. No, the problem is, that they are not displayed the same. Not long after posting my message I realised this also. (o8 -goe- Have a better one, Curtis Maloney ___ 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] 'websafe' colours
On Mon, 02 Oct 2000, Chris Withers wrote: Curtis Maloney wrote: According to a recent study, there are approximately 13 'web safe' colours, out of the full 16,777,216. Can you be bothered restricting yourself to support the 'lowest common denominator' ? What makes the other 15,777,203 'unsafe'? As I understand it, it's due to system palettes. On low colour machines (256 or even 16colour) some colours are reserved for the system GUI so that you can match the 'theme', leaving you with fewer than the full capacity of the display you are using. Admittedly, since most people these days are running 15bit or higher colour depths, and non-paletted video modes, for the majority of users this isn't a problem. (Thus my 'lowest common denominator' comment.) The only other possible reason I can recall is that some of the 'named' colours are not supported by all browsers, or are not interpreted the same. cheers, Chris Have a better one, Curtis ___ 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] Hexcolors and DTML
On Sun, 01 Oct 2000, Peter Bengtsson wrote: This might be a math-python question but... All I want to do is to print out the hexvalue of all black/white colors for a "fading HTML table". #ff, #fefefe, #fdfdfd, ... #020202, #010101, #00 I can do a loop from 1 to 255, but I don't know where to go from there. dtml-in "_.range(1,256)" font color="dtml-var "'#%x%x%x' % (_['sequence-item'] ,_['sequence-item'] ,_['sequence-item'] )""BLAH/fontbr /dtml-in BTW, are there non-websafe greycolors? Can the loop be for only websafe ones? According to a recent study, there are approximately 13 'web safe' colours, out of the full 16,777,216. Can you be bothered restricting yourself to support the 'lowest common denominator' ? If you really want to know what they are, do a quick search back on www.slashdot.org for the link. Have a better one, Curtis Maloney ___ 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] Limited file size editing...
Just curious... I've seen several times on this list people pointing out that the limit on the size of files you can edit in Zope via the web interface is a result of your browser. The sizes I recall were somewhere in the vacinity of 64K. I currently have a 470K file open for editing in Netscape 4.75 (under Linux). What are the limits on various browsers? Ignore me if you think this is too far off topic Curtis. ___ 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] call a dtml doc in subfolder?
On Wed, 13 Sep 2000, [EMAIL PROTECTED] wrote: Hi, I want to call a dtml doc with dtml-var docname where docname is in a subfolder. What is the syntax to do this? This is where we find out why you don't put a . in an object name. (o8 dtml-var folder.docname Simple enough? (o8 --Sean Have a better one, Curtis. ___ 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 do I start ?
On Mon, 04 Sep 2000, Willem Oudyk wrote: Hi, I have just discovered Zope and am interested in developing a web based application but I don't know where to start. Hi! Welcome to the group! (o8 While I am going through the documentation, which will be of help no doubt, I hope these initial questions attract some replies. Here are some of my starting requirements; 1) I need to create a small DB retrieval(mainly) system with only 000's of records and possibly 00's of users. Zope has interfaces for many popular DBs, and a very easy way to use them. If you check http://www.zope.org/Products you will see adapters for DBs like Oracle, Postgressl, MySQL, Sybase, and many others. By using SQL Methods (Documentation at http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.html ) you can easily insert and extract from any connected DB. As for your user base, I would advise you try one of the alternative user management tools ( http://www.zope.org/Products/user_management ) 2) Only a few nominated users will have update rights to the data. Zope makes it easy to use fine grained access control to documents for various 'roles', which you can create and name yourself. Just attribute each user with the appropriate 'roles', and they have all and only the access you give them. 3) The user needs to be able to search for all occurrences of any of the data items presented to them I'm not entirely sure what sort of 'data items' you have in mind here, but afaik, ZCatalogs are a very powerful search tool provided as standard with Zope. http://www.zope.org/Documentation/How-To/ZCatalogTutorial 4) It seems the users have a UNIX infrastructure with an existing DB that is ODBC compliant and has data items which I need to retrieve and update. There is at least one, possibly two Unix based ODBC interfaces for zope. ZmxODBC being one of them. 5) Re: this last point, I'm not sure of yet if my app also needs to be hosted by the UNIX server or whether it can have it's own server and simply make ODBC calls to the UNIX box. I also don't know what would be preferable. I guess having it all on the same box is more efficient. Well, Zope can run anywhere you can run Python. I personally have run Zope on Solaris (Sparc), Linux (i386) and MS Windows 98. 6) I am based in Australia and if anyone is in the same timezone (ie. Melbourne) it would be great to make personal contact. I live in Melbourne. I hope someone out there can point me in the right direction. Always willing to help another Zopista. (o8 - Willem Oudyk 14 Fortescue Grove Vermont Sth. Victoria 3133 Australia Ph/Fax: +61 (3) 9887 9121 mailto:[EMAIL PROTECTED] Web:www.pangaea.nu - Pangaea? Hmm.. I know some people from Pangaean.net... small world, hey? (o8 Have a better one, Curtis Maloney. ___ 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.org is soooooo slow (not really)
On Fri, 01 Sep 2000, J. Atwood wrote: Umm.. what makes you say it is slow? It popped up just as fast as Microsoft.com and Apple.com this morning (with each page after even faster). Might be your connection. Certainly not slow from here (NYC, DSL) J I have to agree with Erik... Sometimes (much of the time) it comes through just fine. But on some days (and it does seem to last just the day) it's slower than a wet weekend. Saying it works fine for you isn't really all that fair, since you are in the same country. What would be interesting to know is WHY it gets slow. If it really is something beyond their control, perhaps mirror sites? Have a better one, Curtis. ___ 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] FSSession problems...
On Thu, 31 Aug 2000, Hung Jung Lu wrote: Curtis, Could you describe how often does the problem happen? How many session users goes to the site? You mentioned about a month of public usage. During that month, did you have one single incident? How many sessions happened during that month? So far, we have one recorded incident, and one anecdotal (from internal) incident. I am having some more extensive testing done soon, so we can try to pin down further the exact circumstances which cause this problem. The site is used for issuing product return authorities, and so far, over 160 RAs have been issued. Yes, it is a fairly low traffic site. Session data is retained between visits (a side effect, but a welcome one), so I really cannot be sure of how many sessions were used. All key-based session management systems are intrinsically unsafe, since other people can tap into your session, with non-zero probability, if the key-length is finite. The only hope is to make the key long enough, so even if the hacker has a supercomputer, it would still take him/her the age of the universe to crack into your website. One thing I mentioned to Pavlos (and/or Anthony Baxter?) before is that the key lengths of their cookies are a bit too short. For my HappySession product (another session management product, which is RAM based), I cranked up the key length to 128 alphanumeric char key, exactly because I wanted no key collision for a long long time. :) Well, yes and no. This really depends on the sensitivity of your data, and how likely it is for someone to try to crack your site. In this case, both are fairly low, so the key strength is fine, IMHO. regards, Hung Jung ___ 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] FSSession problems...
On Tue, 29 Aug 2000, Pavlos Christoforou wrote: On Mon, 28 Aug 2000, Curtis Maloney wrote: /dtml-if This was aparently working fine for quite some time (about a month of public usage), until last week. We have examined logs, and seen that one person accidentaly used the system under someone elses ReturnerID, and then rectified their mistake. If he did rectify the mistake then that should not have resulted in a problem. In any case the problem should have been isolated to that user only. Could it be that the cookie is cached somewhere? I am not familiar with the underlying pricinciples of the apache Proxy directives. The user 'rectified' the problem by submitting the request again under their own ID. I don't know when/how they noticed, and am not able to contact them for further comment. As for the cookie being cached, I don't know. It is possible, as I said, that Apache is causing problems. ProxyForward means that when a URL matches a rule, it will be 'forwarded' to another server, and the returned page issued as if from Apache. From the benchmarks I've seen, this is the fastest way to run Zope. However, I can see how it could confuse Zope into thinking two different users requests are from the same machine, since all the requests are coming from Apache. However, I am hoping (going to check on this, of course :) that the smart folks at Apache have made it 'proxy' properly, to avoid this sort of problem. Pavlos Curtis ___ 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] Nested dtml???
On Tue, 29 Aug 2000, Tim Hicks wrote: I am trying to work my way up through folders, checking whether each folder has a property named 'site_root_folder'. Logically (in *my* head anyway), what I have written below is what I want to do, but I'm not sure that I'm really writing this the write way. I vaguely remember reading that I can't nest dtml-if tags within dtml-in tags. I'd really appreciate any help on this tim dtml-let level=0 dtml-in level dtml-if "PARENTS[level].hasProperty('site_root_folder')" dtml-var "PARENTS[level].absolute_url()" dtml-else level="level+1" /dtml-in /dtml-let Hmm.. it may be slower, but I would normally use a recursive function in this case. DTML Method findRoot dtml-if "PARENTS[rootLevel].hasProperty('site_root_folder')" dtml-return PARENTS[rootLevel].absolute_url()" dtml-else dtml-return "findRoot(_.None, _, rootLevel=rootLevel+1)" /dtml-if Use as: dtml-var "findRoot(_.None, _, rootLevel=0)" Tim: [EMAIL PROTECTED] If you don't mind my asking, why do you need to hunt down this folder? Is there no way Acquisition could be used to simplify your life? Have a better one, Curtis ___ 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] Email files via a form thru Zope
On Mon, 28 Aug 2000, Michelle wrote: Hi, I was wondering if anyone can help me. I would like to have people send files through a form so I have created a form: *snip* Now (theoretically) you are supposed to be able to attach a file (either a .doc or a .xls file and it magically gets emailed to me. I get an email but the file does not attach. Not quite. To attach a file, you must make your message a "multi part MIME" message. This is actually not all that difficult to do, and you can find the details in the DTML documentation. Unfortunatley I am not the most techo-minded person around and I have probably missed the most simplest bit but I just cant make it work!!! This whole Python and external methods and all that sort of stuff has been confusing me like you wouldnt believe! Soo I was hoping that there would be some wonderful person out there to show me the light! :) One think you might want, tho, is to get the MIME patch, that allows expressions for the various fields in the dtml-sendmail tags. This will be helpful for things like user-supplied file names. Check out these pages: http://www.zope.org/Members/rossl/emailattach http://www.zope.org/Members/jephte/MIMETag Look forward to hearing from you! Michelle Have a better one, Curtis Maloney ___ 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] FSSession problems...
On Fri, 25 Aug 2000, Pavlos Christoforou wrote: On Fri, 25 Aug 2000, Curtis Maloney wrote: Greetings, I'm using FSSession to store login details about visitors to our site. It is important that users only be able to see their own data (of course). Today, however, I find out that some mistakes have been happening. People are finding themselves logged in when they haven't yet, and others finding they're logged in as someone else. This is, obivously, a problem. I cannot see how this could be happening, since the Session ID is stored in a cookie, which should be unique to the client. This is very weird indeed. Nobody has ever reported a similar problem. Can you send me the DTML method that calls the FSSession? Yes. Very weird. I'm not doing anything fancy. dtml-call FSSession is in the standard_html_header. Once the users name/password has been verified from the db, i use: dtml-call "FSSession.set('ReturnerID',ReturnerID)" to set the value, and test if the user is logged in with : dtml-if "FSSession.has_key('ReturnerID')" Logging out works fine, with: dtml-if "FSSession.has_key('ReturnerID')" dtml-call "FSSession.delete('ReturnerID')" /dtml-if This was aparently working fine for quite some time (about a month of public usage), until last week. We have examined logs, and seen that one person accidentaly used the system under someone elses ReturnerID, and then rectified their mistake. Pavlos I really would rather continue using FSSession, as it has worked fine for me in the past, and I find it very simle to use. It would also save me from having to totaly rewrite the site. (o8 Then again, I am considering using Zope level user authentication in the next revision of this site, but that is already planned to be a major overhaul. Really, I just want to know what's going wrong... Have a better one, Curtis ___ 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] FSSession problems...
On Sat, 26 Aug 2000, Timothy Wilson wrote: On Fri, 25 Aug 2000, Curtis Maloney wrote: Today, however, I find out that some mistakes have been happening. People are finding themselves logged in when they haven't yet, and others finding they're logged in as someone else. This is, obivously, a problem. Warning! Shot in the dark ahead. :-) Is it possible that your visitors who are experiencing this problem are sitting behind a proxy that is improperly caching their cookies. I've seen something like this where you could log in to zope.org, go to a different machine and find that you were logged in there too. Not something I hadn't considered. But I dismissed it fairly quickly, as I saw the behaviour displayed on two machines in house, which do not use a proxy. What I _have_ considered, tho, is that Apache, which is set in ProxyForward mode, might be confusing the issue somewhat. -Tim Curtis. ___ 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] FSSession problems...
Greetings, I'm using FSSession to store login details about visitors to our site. It is important that users only be able to see their own data (of course). Today, however, I find out that some mistakes have been happening. People are finding themselves logged in when they haven't yet, and others finding they're logged in as someone else. This is, obivously, a problem. I cannot see how this could be happening, since the Session ID is stored in a cookie, which should be unique to the client. I am using: Zope 2.1.6 on Solaris 2.7 FSSession 0.4.0 Have a better one, Curtis. ___ 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] FSSession problems...
On Fri, 25 Aug 2000, Curtis Maloney wrote: Greetings, I'm using FSSession to store login details about visitors to our site. It is important that users only be able to see their own data (of course). Today, however, I find out that some mistakes have been happening. People are finding themselves logged in when they haven't yet, and others finding they're logged in as someone else. This is, obivously, a problem. I cannot see how this could be happening, since the Session ID is stored in a cookie, which should be unique to the client. I am using: Zope 2.1.6 on Solaris 2.7 FSSession 0.4.0 Further details: Some internal testins has shown that is User A logs in with IE, and User B opens the page fresh (from another machine) they will be logged in as User A. But if User A logs in with NS, this doesn't happen. I am really confused as to what's going on My only thoughts are that FSSession is perhaps getting confused by Apache, but surely it would re-issue the same Session ID the request came in with? Curtis ___ 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 crontab instead of rc.d
On Thu, 24 Aug 2000, Dominic Mitchell wrote: On Thu, Aug 24, 2000 at 09:46:11AM +, Stephan Goeldi wrote: 5 * * * * root./start This would start the script every five minutes. Now how do I check if the script is running after it's been started and if it wasn't to restart it again. Why don't you write a shell script which 1. starts the ./stop script, and 2. starts the ./start script every 5 minutes? So you don't have to check if Zope runs. It's like a restart. That would be very intensive on the server. Imagine if your office file server was set to reboot every 5 minutes, "just in case". It's far better to just check if it's dead and only then restart it. Sounds to me like you need a script to do the following: check if /tmp/zope.pid exists if it does, check if a process of the number stored in there is running if not, start zope if not, start zope. I really suck at shell scripts, but from what I've seen, you will need some way to grab the PID of Zope as it starts. -Dom Have a better one, Curtis Maloney ___ 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
On Fri, 25 Aug 2000, 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.. Yes, I ran into a similar problem recently, trying to access a remote DataFLEX db (with an ODBC add on) from Linux. If you search the how-tos carefully, there IS documentation on how to patch one of the DAs to work with mxODBC, a python ODBC interface. I have built this product, and it appears to work, but I as yet have not really tested it. If you want the post-patched product, I can tar it up for you, and e-mail it directly. Thank you. Tony Corrente Web Administrator OMC Europe V.O.F. Drongen Belgium . Have a better one, Curtis Maloney ___ 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] Barcodes, magnetic cards, etc.
On Wed, 23 Aug 2000, Erik Enge wrote: Good morning, people. I was wondering, can Zope interface to barcodes, magnetic cards (e.g. credit cards) and other common shop-"accessories"? Well, I have used Zope with a Barcode scanner. Since the scanner (as do most) work via the keyboard, AS a keyboard, there is really nothing special to do. We did include some JavaScript to make the focus change when ENTER is hit, since the scanner sends that at then end of a scan. input type="text" name="name" onKeyUp="if (event.which == 13) { document.forms[0].NextField.focus(); }" Feedback is greatly appretiated :) From what I can find (working for a company that sells barcode and mag stripe scanners) you should have little trouble finding either that will interface as a keyboard. Have a better one, Curtis Maloney dtml-var standard_work_disclaimer ___ 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] Barcodes, magnetic cards, etc.
On Wed, 23 Aug 2000, Erik Enge wrote: [Curtis Maloney] | Well, I have used Zope with a Barcode scanner. Since the scanner | (as do most) work via the keyboard, AS a keyboard, there is really | nothing special to do. Ok, so it translates the barcodes to a string or what? No, it types the barcode, as if it were a keyboard. MOST barcode scanners I've encountered (Intermech, Symbol, various others) plug into AT or PS/2 keyboard ports, and act exactly as keyboards. Which scanner was this? Product, model type, etc. Check out http://www.umd.com.au/contents.html | From what I can find (working for a company that sells barcode and | mag stripe scanners) you should have little trouble finding either | that will interface as a keyboard. What is the mainstream format for the codes when the are scanned in? I don't understand what you mean. | Have a better one, I will - you too :) Curtis. ___ 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] Barcodes, magnetic cards, etc.
On Wed, 23 Aug 2000, Erik Enge wrote: [Kapil Thangavelu] | zope is a great integration platform. anything you can touch in python | either through natively, Is there a repository or somesuch where I would find a more complete index of all devices Python can interface to? Well, you could start at http://www.python.org and go from there. Try the search link. Their link to Vaults of Parnassus is good, too. http://www.vex.net/parnassus/ Curtis. ___ 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] Barcodes, magnetic cards, etc.
On Wed, 23 Aug 2000, Erik Enge wrote: [Curtis Maloney] | On Wed, 23 Aug 2000, Erik Enge wrote: | What is the mainstream format for the codes when the are scanned in? | | I don't understand what you mean. Are the barcodes usually a collection of integers, characters, special characters or what? Ah.. now we come to the interesting parts. (o8 Different barcode character sets contain different symbols. Mostly, however, they will contain letters and numbers. Take a look at an item with a barcode, and you will see a string underneath it. This is the human readable form of the barcode. And, by the way, do you know if there exist a magnetic card scanner that plugs in to the PS/2? And if yes, which information would get from such a card? Just a number, or are there other possibilities? What is on the card is, strangely enough, what is on the card. Magstripe readers commonly interface to ps/2 keyboard ports via a 'chok' or 'wedge', which just plugs inline with your regular keyboard. Thanks. Not a problem. Curtis. ___ 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 can I determine the list of user names?
On Thu, 24 Aug 2000, [EMAIL PROTECTED] wrote: I would like to construct a pull down of the users defined in an acl_users of a particular location. I am doing this soon, also, so I've put in a little thought on the problem. (But only a little :) Say in particular, that /protected/acl_users exists. How do I find (in dtml or in python), the list of names defined in that particular acl_users. My guess (untested) is : select name="users" dtml-in getUserNames option value="dtml-var sequence-item"dtml-var sequence-item /dtml-in /select To slightly generalize, how would one tree-walk to find the list of all acl_users above a particular object? Well, as I said, this is untested, but I'm assuming getUserNames does this for you. The ZQR is somewhat sparse on the details. Thanks Please, let me know how this goes. Jim Have a better one, Curtis Maloney ___ 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 bug or my stupidity?
On Wed, 16 Aug 2000, Peter Hernberg wrote: --- Chris Withers [EMAIL PROTECTED] wrote: Peter Hernberg wrote: Here's the method that calls that method: dtml-var "get_storys" Why the quotes? try dtml-var get_storys instead But then I get the following weird error: Traceback (innermost last): *snip* (Object: objectValues('Story')) File /root/Zope-2.2.0-src/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval (Object: sequence-index == 0) (Info: index) File string, line 0, in ? NameError: (see above) I am fairly new to zope, but this seems pretty weird, especially the method returning its dtml source. And you've been caught by one of the most common (and understandable) newbie mistakes. (o8. 'sequence-item' is not a valid Python name. To Python it looks like " sequence - item ", the mathematical expression. This is a holdover from days of old, and not much has been done to deprecate it (all my shouting, and that of others, has so far come to naught.) dtml-var sequence-item will work, because that is in Zope Land... no quotes. dtml-var "_['sequence-item']" is the Python Land equivalent. the _[] name space lookup is your friend for this sort of problem. dtml-if "sequence-index (numStories - 1)" should be written as: dtml-if "_['sequence-index'] (numStories -1)" = Peter Hernberg An all-purpose, antibacterial, lemon-scented geek/nerd I guess I should really try to rally people to send this to the collector... Have a better one, Curtis Maloney. dtml-var standard_work_disclaimer ___ 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 use RESPONSE.redirect ?
On Wed, 16 Aug 2000, Stuart Foster wrote: I want to use redirect to call another form passing the current form, how can I do that. dtml-call RESPONSE.redirect('otherform'+?) If I do dtml-call RESPONSE.redirect('otherform') The current form isn't being passed ? If you want to pass the form variables, you're in for a fight. (o8 otherwise, you could simply try : dtml-var "otherform(_.None, _)" instead of a redirect. If you want to make sure only the correct form vars are passed, you could flub it with something like: dtml-call "RESPONSE.redirect('otherform?var1=%svar2=%s' % (var1, var2) )" If this doesn't help, some more detail on your part might. (o8 Any ideas.. TIA Stuart Have a better one, Curtis. ___ 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] Hotfixes: serious suggestion
On Wed, 16 Aug 2000, David Trudgett wrote: At 2000-08-15 10:18 +0200, "Frank Tegtmeyer" [EMAIL PROTECTED] wrote: The current format is Hotfix_08_09_2000, my proposed format is Hotfix_2000-08-09. This is the ISO 8601 format (abbreviated form). Reasoning: First of all Zope is a product of a north american company but is used worldwide. Not all countries use the american form of dates, so it would be nice to have a standardized one (in my opinion this applies also to the standard date functions in Zope). The reasons for establishing ISO 8601 apply here as well: - ordering of month and day are different in Europe and America, this leads to difficulties interpreting date values - ISO dates are sortable by string functions - ISO dates are easy to parse by humans AND programs Opinions? I agree. If everyone standardised on ISO 8601 in written date and time formats, the world would be a saner place. Writing MM-DD-YY(YY) is just silly in my opinion, no matter how you like to say it out loud. It may have been acceptable in times past (like when the Internet was not nearly globally ubiquitous), but these days it's just an anachronism (as is DD-MM-YY, because it is easily mistaken for MM-DD-YY). Likewise for 12 hour We had a similar discussion here at work, and simply put "Largest to smallest" makes the most sense. / MM / DD / HH : MM : SS time. There's only one 14:00 in the day, and that's the way I like it! ;-) So, when are you joining me in working in UTC? I mean, really. We deal with people globally on a daily basis. Why bother with all this timezone nonsens? So I get up and out of bed at 2100, get to work at a fresh and early 2300, have lunch when the sun is high at 0200, and finally make it home, on an early day, for dinner at 0900. (o8 David Trudgett Confuses people when they ask you for the time, tho. (o8 Have a better one, Curtis Maloney ___ 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] Redhat 6.2 problems
On Fri, 11 Aug 2000, Scott Burton wrote: I am trying to run the latest version of Zope (2.2.1 beta) on a Redhat 6.2 Linux system. When I run the ./start script it gets to the Zope Server Monitor and sits there. It never returns back to the bash prompt. I can get to Zope's management interface from a browser so Zope *is* running. However if I close that terminal window, Zope stops. Python 1.5.2_13 is the version installed by Redhat. Which is the correct version of Python, last I checked. Also, if I run a startup script to start Zope during the boot process, it hangs the boot process. Any suggestions? Because the start script runs Zope in Debug mode by default (-D), it does not background. Either run ./startor remove the -D from the start script. Personally, i have added the following line to the end of /etc/rc.d/rc.local : /bin/su -l zope --command=/usr/local/zope/start I have added a user called zope, and 'chown'ed all the zope files to user zope group zope. Alternatively, you CAN run zope from inittab by adding: zo:234:respawn:/bin/su zope -c /usr/local/zope/start /dev/msglog2 /dev/msglog /dev/console This will mean that if, for some bizarre reason, zope crashes (or is killed), it will restart. Scott Burton Have a better one, Curtis Maloney ___ 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] SV: [Zope] getitem('string') but with HTML
On Wed, 09 Aug 2000, peter be wrote: Yeah! It worked. I didn't use you dtml-in at all, and I guess you didn't understand my unwell-formated question. However, getitem(arg,1) worked! Can somebody tell me the difference between: _.getitem(arg) and _.getitem(arg,1) ?? And what does _.getitem(arg,n) do? Where n is 0,1,2,3,4,... From the Zope Quick Reference: getitem(name,flag) Lookup a name in the namespace. If the value is callable and the flag is true, then the result of calling the value is returned, otherwise the value is returned. flag defaults to false. Well worth keeping a copy on hand, IMHO. (o8 Have a better one, Curtis. ___ 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] Hardware minimum for development
On Wed, 09 Aug 2000, Aleksander Salwa wrote: Now I'm developping on PC with 48 MB RAM, and it's too little for me. It's because I'm working on one machine - Zope, X-Window, Netscape with few windows open, sometimes Apache and Gimp are running together. pt.. here's a tip. I used to run out of RAM all the time when developing in Zope via Netscape. It's partly due to Netscape having some huge gaping memory leaks. I have, however, discovered how to avoid it. I discovered quite by accident one day, that if you disable JavaScript, it doesn't happen. Just thought this might save you the cost of memory, which is prohibitive these days. I'm satisfied with my CPU - k6-2/300MHz is sufficient for me. I'm going to buy some memory in few next days, I think additional 32MB will be enough. Have a better one, Curtis Maloney ___ 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] string to objectname conversion ?
On Tue, 08 Aug 2000, Gijs Reulen wrote: Hi I would like to list all objects in a folder. No problem there. However, I want to use the function/method universely so I need to pass the name of the target folder; as a string is the only way I can think of (formatted as a url). I tried several things in DTML and studies the DTML Ref, the mailinglist and the How-To's very hard but did not have the Enlightment yet :-( Is it possible ? You looked in almost all the right references. (o8 The one more that you will find indispensible from now on is the Zope Quick Reference. Go now, read it, save it, love it. (o8 Example: dtml-in "PARENTS[0].objectValues()" dtml-var icon dtml-var id dtml-var title dtml-var meta_type dtml-var bobobase_modification_time fmt="%m/%d/%Y" /dtml-in But then instead of PARENTS[0] some parameter, for example: /method?folder=foo You want the getitem method of _ dtml-in "_.getitem(sObjectName).objectValues()" ... /dtml-it Gijs Reulen Have a better one, Curtis Maloney ___ 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] indirection problem
On Thu, 03 Aug 2000, David Coe wrote: I *think* you've stumbled upon the way _.getitem behaves by default: (from the DTML reference) getitem(name,flag) Lookup a name in the namespace. If the value is callable and the flag is true, then the result of calling the value is returned, otherwise the value is returned. flag defaults to false. so "_.getitem(file, 1)" will probably do what you want. But that's also basically the same as dtml-var file -- did that not work for you? Erm.. no, it's not. In my experience with getitem, i've found that: dtml-var file would be equivalent to: dtml-var "_.getitem('file',1)" not, as you said: dtml-var "_.getitem(file,1)" Note the quotes around file. Your method says "render the object named in file." The devil is in the details. (o8 Have a better one, Curtis. ___ 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 do I control iteration over XML elements?
On Tue, 01 Aug 2000, Jean Jordaan wrote: hi Curtis Yaaay! It works :) Thanks a lot! I wouldn't have found "objectValues" on my own .. where'd you learn about that? I'm ploughing through docs and wiki's now, just don't know if they're the right ones. I also need to read more about Python .. The Zope Quick Reference. An indispensible resource, which you can find through the zope.com Documentation section. Anyway, I messed about with your instructions a bit, and tried: dtml-var "text_content('member')" (which renders nothing), and: dtml-var "text_content" which renders: Python Method object at 13bead8 Dunno how soon I'd've navigated that maze on my own. The "text_content" I can understand -- putting it between "" means that it should be evaluated, so text_content is evaluated without parameters, and dtml-var is being asked to render the method itself. Doing "text_content('member')", text_content is replaced by the result of evaluating it on 'member' .. this works when it's fed the output of getElementsByTagName, but since I'm already "in" the members, there aren't any member elements to be had inside them -- only their text_contents. Another option is getChildNodes() Well, that's as far as I can puzzle it out .. Now for another question (which I'm throwing to the group seperately too): How do I show all groups that a specific member is part of? In other words, if I have: teams team nameHam/name descWhite papers, brochures, case studies./desc memberEduan/member memberJacqui/member /team team nameGreen eggs/name descGreen papers, brochures, case studies./desc memberTracey/member memberJacqui/member /team /teams how do I get "Jacqui is member of the Ham and Green eggs teams." yuck dtml-var member_name is member of dtml-in "objectValues('team')" dtml-in "objectValues('member')" dtml-if "text_content() == member_name"dtml-var name, /dtml-if /dtml-in /dtml-in that's my best guess, but you _might_ run into a problem with 'name' Have a better one, Curtis. ___ 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 do I control iteration over XML elements?
On Tue, 01 Aug 2000, Jean Jordaan wrote: Hi Curtis all yuck indeed. Just thinking aloud .. I got as far as: dtml-in "teams[0].getElementsByTagName('team')" dtml-in "objectValues('member')" !! but now I can't see 'team' anymore :( Erm... I was banking on it still being in the namespace, since all the dtml-in does is push another object onto the namespace. dtml-let membername="text_content" dtml-var membername is member of dtml-in "objectValues('team')" !! this whole -in never contains anything .. because !! I'm already -in member (Have I got this right?) dtml-var "text_content('name')" dtml-in "objectValues('member')" dtml-if "text_content == membername" dtml-var name, !! AFAICT 'name' won't be visible -in 'member' .. /dtml-if /dtml-in /dtml-in /dtml-let br /dtml-in /dtml-in I think I need a lot more Python than I know .. I've got this far with almost 0 python knowledge. (o8 But yes, learning some Python can be a very helpful thing. 1. objectValues returns a list -- this needs to get sorted duplicates dropped. sorting is easy with dtml-in removing duplicats is another story... 2. when -in team and -in member, the name of the team needs to be accessible. As I said earlier, AIUI name should still be in the namespace. Have a better one, Curtis ___ 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 do I control iteration over XML elements?
On Tue, 01 Aug 2000, Jean Jordaan wrote: Hi all If I have (in an XML Document): teams team nameName of team/name descWhite papers, brochures, case studies./desc member class="leader"Tracey/member memberEduan/member memberJacqui/member /team /teams Then: dtml-in "teams[0].getElementsByTagName('team')" dtml-var "text_content('member')" br /dtml-in gives me this: TraceyEduanJacqui br I'd like to format the output, putting br's between all the names, for example. How do I do that? Simple enough. You just need another dtml-in inside replace: dtml-var "text_content('member')"br with: dtml-in "objectValues('member')" dtml-var text_contentbr /dtml-in Works for me. (o8 Cheers, Have a better one, Curtis. ___ 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 start developing in zope
On Mon, 31 Jul 2000, Firestar wrote: Hi, thanks for your reply. Is acquisition similar to the concept of 'inheritance' in OOP? (or more?) I heard of this 'algebra of acquisition' written by someone...is it essential and where can i find it? TIA. In many ways, yes. Acquisition is very similar to inheritance, in that it deals with the sharing of namespaces. After that, it starts to become a little more complex. (o8 An important thing to remember if you're coming from an OO background (like C++, for instance) is that EVERYTHING is an object. Even the folders. I highly recommend you read the Acquisition Algebra document on the Zope website (easy to search for). The main exception to the normal rules of acquisition, it seems, is the DTML Method, which directly inherits the namespace of the referring object, instead of using AA. regards, firestar Have a better one, Curtis. ___ 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] connection problem
On Mon, 31 Jul 2000, vance wrote: Hi, I'm running Zope 2.1.6 on Redhat 6.2 Intel based system. It appear to start and when I go to manage page and enter username and password I get the following error: Traceback (innermost last): File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 214, in publish_module File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 179, in publish File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 151, in publish File /usr/share/zope/lib/python/Products/SiteAccess/ChangeBehaviors.py, line 244, in traverse File /usr/lib/python1.5/site-packages/ZPublisher/HTTPResponse.py, line 551, in unauthorized Unauthorized: i have used zpasswd.py and set a username and password but can't get any further. I have read and re-read docs to no avail. Please help! Just a quick question have you restarted Zope since changing the password? Best regards, Vance Stith Boplicity - http://www.boplicity.com [EMAIL PROTECTED] 610.807.9724 (phone) - 610.867.4291 (fax) Have a better one, Curtis. ___ 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] ODBC SQL DA
Greetings, I have been digging about for a couple of weeks, and either I'm missing something (most likely :) or where there once was a mxODBC adapter, there is no longer? I am going to need to dig into an ODBC based DB (DataFlex), for which we have an ODBC interface. The db was not my choice, so there's no option there. However, I saw a few references to various ODBC DAs in the product lists. With ODBC supposedly being a 'generic' interface, why does each different DB require a different DA? Is this just tailoring the DA for that specific DB? In which case, would it be possible to build a "Generic" ODBC DA? Fortunately, this is not a priority project, but I would appreciate some details in this matter. Oh well, back to the archives. Have a better one, Curtis Maloney dtml-var standard_work_disclaimer ___ 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 a front end...
On Thu, 20 Jul 2000, Bill Anderson wrote: Toby Dickenson wrote: On Tue, 18 Jul 2000 16:08:48 -0600, Bill Anderson [EMAIL PROTECTED] wrote: I might be reading more into his words than was intended, but I think this demonstrates the problem. Distributing multiple requests for one section across multiple servers is (what I consider to be) undesirable. You can actually do it either way. Curtis (AIUI) complained that the method described meant your site depended upon each of th esection's servers being up, that there was no redundancy. So I described a way of doing it with redundancy. What you described doesn't scale up to having 1000's of sections (which I was assuming, and I think Curtis was too). If this isn't a problem, then your solution is great. I don't understand why you think it doesn't. DNS has clearly demonstrated the ability to handle 'thousands', and the entire scalability of a cluster is the addition of machines. You appear to be desirous of having a machine handle a section. Thus, for thousands of sections, you have thousands of machines. Again, with a ZEO clusters the bottleneck/SPOF would be the ZSS, but that _could_ be worked aorund, and has nothing to do with 'sections' of a website. Bill, Whilst the structures you've described are very effective, your example of libc.org required one thing in particular that I'm not sure is available: prior knowledge of which sections will be hit hardest. Essentially, your setup allows any 'server' to become a 'server cluster' for scaling purposes. Great! So, if for now on we assume 'server' can mean 'single or cluster of servers' The desire isn't for fixed server-section relationship. Instead, a 'preference' for that section to go to a particular server, so that the request 'hopefully' goes the server with the greatest chance of having the relevant objects in cache. In fact, with the further information provided, what you really want is for requests from a particular client to go to the same server. This would be better served with a redirection to a server specific domain name (serverN.mysite.com). However, for the initial request, your best choice is to go to the server that last served those pages. Since dynamically tracking this info would be onerous, by encouraging requests for one section toward a particular server, you improve the chances of it holding the relevant objects in cache, with merely a fraction of the processing/data overheads. Beyond that, your bottleneck would be networking. Whether yoour individual BE servers responded directly to the web browser, or whether they were channeled through a single/multiple FrontEnd servers. The decision to implement a BE-Client vs. a BE-FE-Client topology has not been discussed, as it is irrelevent to the discussion. Ah, topology. (I'm leaving it there. I really don't have time to get into this fully :) In fact, come to think of it, I have noticed many sites redirect a /foo/bar usr to a foo.domain.com or bar.domain.com. EddieWare does do 'intellgient' caching eddieware is on my list of option to try out next month... Ill keep you posted Cool. Have a better one, Curtis dtml-var standard_work_disclaimer ___ 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 is memory intensive?
On Tue, 18 Jul 2000, Firestar wrote: Hi, i have installed Zope on a RH6 box, and looking at the processes, Zope(running as 'python') consumes abt 20% of the memory usage! A single apache daemon only takes abt 9-10%. Is Zope supposed to be so memory intensive? Well, it's all relative, isn't it? (o8 I mean, does Apache do the same work as Zope? Does it cache Python objects, is is maintaining database connections, etc etc etc. I am running Zope on a RH6.1 box, with 96M RAM. It's using about 12.5% of my memory, so far as I can tell. However, a % isn't much of a guage unless you tell us how much actual memory you have. Personally, I find that Netscape is more of a problem memory wise than Zope ever will be. (o8 regards, firestar Have a better one, Curtis Maloney dtml-var standard_work_disclaimer ___ 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 a front end...
On Tue, 18 Jul 2000, Bill Anderson wrote: Your multiple Zopes can all serve all of these sections, however theres not enough storage for each machine to hold all the sections simultaneously. As I understand ZEO, each machine _doesn't_ hold the site. The ZEO clients (servers) communicate with a central ZSS (Zope Storage Server). So in this contrived example, the problem is non-extant. ;-) You can make better use of ZODB's in-memory cache and the ZEO pickle cache if the requests for /section1 usually go to the same server. AIUI (I'm no ZEO expert, I just use it ;) ), you can have each server cache a certain amount, thus ameliorating the problem somewhat. Yes, however his point is that by having each Zope instance 'predominantly' serving one portion of the site, its cache will contain more objects relevant, and thus be just that little bit faster. Personally, I find this such a simple idea that it MUST be good. (o8 So much so, in fact, that I've decided to have a crack at writing just such a redirector. I feel the Zope world (and others, most likely) could benefit from a 'preferential' redirector. Watch this space. (o8 Have a better one, Curtis Maloney. ___ 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 a front end...
On Tue, 18 Jul 2000, ethan mindlace fremen wrote: Curtis Maloney wrote: Yes, however his point is that by having each Zope instance 'predominantly' serving one portion of the site, its cache will contain more objects relevant, and thus be just that little bit faster. Personally, I find this such a simple idea that it MUST be good. (o8 So much so, in fact, that I've decided to have a crack at writing just such a redirector. I feel the Zope world (and others, most likely) could benefit from a 'preferential' redirector. The way I would do this is have section1.contrived-example.com section2.contrived-example.com section3.contrived-example.com with siteAccess, and then each zope would serve it according to it's IP (though each "could" serve each site). Then you can use whatever IP/DNS load balancing tool your heart desires. I think most people seem to be missing the point here. The idea is that ALL servers can serve ALL content. HOWEVER, the 'load balancer' will opt for a certain server for a certain URL, in order to improve cache hits. So, for www.contrived-example.com/dir1 it will first try server1, but if it's busy (or down) it will try others. This way, the cache on server1 is more likely to contain objects relevant to /dir1 and thus have a higher hit rate, therefore improving performance. An enforced 'mapping', as you were suggesting, removes ALL redundancy from the site, but would likely provide even better cache hits. a thought, Have a better one, Curtis ___ 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] Acquisition problems?
On Thu, 13 Jul 2000, Stephen Harrison wrote: Curtis Maloney wrote: [snip] Well, here's the details: / standard_html_header register /internal/ standard_html_header register works fine if invoked as /register however, it spits the dummy if invoked as /internal/register Complaining loudly about TypeError: too many arguments; expected 2, got 3 in standard_html_header. Is register a method, or a document? If it is a method the when you It is a document. call /internal/register you are calling the object internal with the method register, so when it looks for standard_html_header it will first look in internal, before doing the acquisition thing. So it finds internal/standard_html_header. If it is a document, then you are calling the object /register, in the context of internal, but the containment of / so you get /standard_html_header. Yes, well.. This is what I worked out from the Acquisition Algebra tute, and from MP, but this is not what the actions of the site suggest. When I modified /internal/standard_html_header, the actions of register as /internal/register changed. This is what has me so confused. That, and the fact the page give an error at all, when it works frine as /register. In algebra terms, if register is a method, you have (internal o /) but if register is a document (or folder, or other object) you have ((register o /) o (internal o /)) This is how acquisition (simple acquisition) behaves. Of course, I am strongly of the opinion that this method of acquisition is of very limited use and zope should really use natural acquisition (see http://www.zope.org/Wikis/zope-dev/AcquisitionUsage for a definition). [snip] As it is, in order to achieve the result described above you have to carefully construct your site in order to work around the problems with acquisition, which really isn't the way we should be doing things. Well, it just so happens this is what I'm doing next. (o8 I was handed this site to "fix", which has taken a lot of work. However, rewriting it properly would have taken longer, and the project was already overdue. Sorry to go on about this, but as time passes I am becomming more and more convinced that the method of acquisition needs to change from containment before context to context before containment. Rant away, please. I believe it can be a great way to provoke ideas in other people. Besides, if we never complained, how would they know there was a problem? (o8 I have yet to think of any advantages provided by the current method, but I would be more than happy to hear of any. Cheers, Stephen Thanks for trying, Curtis. ___ 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: Bizarre error with standard_html_header
On Wed, 12 Jul 2000, Jonathan Desp wrote: well if you use that script ? -- meta http-equiv="refresh" content="0 ;URL=http://www.apple.com/enterprise/" It will fix your problem ? I think you've completely missed the point of my post. Firstly: I don't use those meta tags unless i absolutely have to. The redirection I have in place works fine, when it gets parsed. Secondly: My problem is NOT redirecting the page. I added the redirect as a debuging tool, to find out if the DTML parser was getting that far. In case you've not noticed, any time you get an error, that object is not rendered at all, instead the error report is put in its place. What it showed me was that the page in question was not being parsed at all, even tho the traceback shows it is. --- - Ok... this one has me flummoxed. I just can't make ANY sense of it. I am taking advantage of Acquisition to save me from having to have two copies of a page... fine.. common... well understood, etc. Problem is, when i go to the page from the lower directory, it throws some bizarre Type error, complaining about too many parameters to standard_html_header. I dug about, i insterted a redirect to try to find WHEN it was hitting. What got me was this: I put dtml-call "RESPONSE.redirect('index_html')" as the VERY FIRST LINE of the DTML Document. But the problem still occurrs!! This just makes NO sense. System: RedHat 6.1 Zope 2.1.6 Have a better one, Curtis. ___ 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] Bizarre error with standard_html_header
Ok... i dtml-commented out standard_html_header, and it worked fine.. What gets me is the header should work fine. If I understand Acquisition properly, the object should be rendered from within the namespace of the directory it's being called in. So, if i get "/internal/register", and register exists in / not /internal, then it will be rendered as if it was in /internal. Fine. In that case, the standard_html_header in /internal, which requires the existance of various objects in /internal, should render fine. What confuses me is the "TypeError: too many arguments; expected 2, got 3". How can this be happening? What am I missing, here? Have a better one, Curtis Maloney dtml-var standard_work_disclaimer ___ 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: Bizarre error with standard_html_header
On Wed, 12 Jul 2000, Martijn Pieters wrote: You are seeing transactions at work. Your DTML Method _is_ being processed, only an exception caused the publishing process to stop, roll back the transaction, and return the error message to you. DTML is not a linear language like ASP, it is not processed one line at a time and bails out at the first error. DTML is parsed into an object tree when entered, and this tree it then later on asked to render itself. An exception in this tree will propagate down to the publishing level, and then turned into an error response. So DTML is, like Python and Java, object oriented and exception driven. If you want to see how far a page gets, try using dtml-try blocks around parts of your code. You can then catch the exception higher in the object tree, and generate your own messages in reaction to this. Fine... so my debuging techniques are less than perfect. I will change them in future. Thanks. That doesn't change my original problem, which everybody has so far decided to ignore. Curtis. ___ 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: Bizarre error with standard_html_header
On Wed, 12 Jul 2000, Martijn Pieters wrote: On Wed, Jul 12, 2000 at 05:00:45PM +1000, Curtis Maloney wrote: Fine... so my debuging techniques are less than perfect. I will change them in future. Thanks. That doesn't change my original problem, which everybody has so far decided to ignore. Well, I can't really see what is going wrong, and can only suggest techniques of honing in on the problem. At your suggestion, i've wrapped any contentious parts of the internal/standard_html_header in a dtml-try, which has had no effect. Firstly: what would cause Zope to give me that type error? Too many arguments? I'm not doing anything fancy. This worked until i changed the standard header, which is why i'm digging about in it. but since the only parts of that now that are not in a try statement are raw HTML, how could it go splat? From what I understand of the traceback, the problem is occurring in the header, but it's not clear WHERE, or, tbh, WHY. Any more help much appreciated. If you want to see the actual DTML, just ask. Curtis Maloney. ___ 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: Bizarre error with standard_html_header
Forgot to include: Zope Error Zope has encountered an error while publishing this resource. Error Type: TypeError Error Value: too many arguments; expected 2, got 3 Curtis. ___ 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: Bizarre error with standard_html_header
On Wed, 12 Jul 2000, Martijn Pieters wrote: register will look in internal for objects, but only if it can't find them first in the mysite (root) object. Read Jim's acquisition algebra texts: http://www.zope.org/Members/jim/Info/IPC8/AcquisitionAlgebra/ So we have: mysite/ standard_html_header register internal/ standard_html_header and you are calling mysite.internal.register, which in turn tries to call mysite.internal.register.standard_html_header. mysite.internal.register is, in Jim's algebra: ((register o mysite) o (internal o mysite)), so when register tries to call standard_html_header, it will go from left to right through this list, and will find mysite.standard_html_header first. I'll go back and read Jims algebra.. sounds like an eminently logical way of keeping things in order. (o8 However, there are some problems with what you say. If it's using /standard_html_header, then why did things change (not exactly for the better, but changed) when i started messing with /internal/standard_html_header ? If this worries you about your view of Zope, you're about to reach your next level of Zope Zen. =) Oh, goodie! Do I get a badge for this one? (o8 File /usr/local/Zope-2.1.6-src/lib/python/OFS/DTMLMethod.py, line 146, in __call__ (Object: standard_html_header) File /usr/local/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: standard_html_header) TypeError: (see above) The first 3 lines let us know that we are _inside_ an object called standard_html_header. In your case this will be the on in the root Folder of your site, I suspect. Well, yeh. From reading the traceback, I thought the problem was in standard_html_header, too. So, first I tried to establish WHICH. What actually goes wrong I don't know. It _probably_ goes wrong inside the rendering of this object, but this is masked, I think, by the fact that the next step on the stack is in render_blocks, which is implemented in C. Well, what still gets me is it complaining of the wrong number of parameters... how can this be? I think if we can work that out, we'll be a step closer to heaven. Have a better one, Curtis. ___ 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-in and maps...
Greetings, This seems like it should be a simple thing but I can't seem to find how to make dtml-in behave with maps. In particular, empty maps. I've tried mapping, i've tried testing _.len(map.keys()), and various other things. But it always fails, telling me Error Type: KeyError Error Value: 0 What am I missing? Have a better one, Curtis. ___ 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] R: [Zope] dtml-in and maps...
On Tue, 11 Jul 2000, Marcel Preda wrote: Greetings, This seems like it should be a simple thing but I can't seem to find how to make dtml-in behave with maps. In particular, empty maps. I've tried mapping, i've tried testing _.len(map.keys()), and various other things. But it always fails, telling me Error Type: KeyError Error Value: 0 What am I missing? Have a better one, Curtis. looks like the variable that you are using in dtml-in ... is noat a sequence (list || tuple) I suppose that your var is a dictionary Well.. this is where things start to get fun. (o8 I have a dirty great array along the lines of : [ [ 'string', 0, { 'name':'value' } ], [ 'string', 0, { 'name':'value' } ] ] (I love python.. the same thing in C/C++ would take HEAPS of work :) So, I iterate over the array... that's working fine... Then, for each iteration, I handle the data however... I wind up with: dtml-in "_['sequence-item'][2]" !-- do stuff here -- /dtml-in But that's where the problem begins. Insted of : dtml-in x mapping you have to use: dtml-in "[x]" mapping as a list dtml-in "(x,)" mapping as a tuple So, you're saying that by creating a list with one element which is a dictionary... ? PM Have a better one, Curtis. ___ 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] Bizarre error with standard_html_header
Ok... this one has me flummoxed. I just can't make ANY sense of it. I am taking advantage of Acquisition to save me from having to have two copies of a page... fine.. common... well understood, etc. Problem is, when i go to the page from the lower directory, it throws some bizarre Type error, complaining about too many parameters to standard_html_header. I dug about, i insterted a redirect to try to find WHEN it was hitting. What got me was this: I put dtml-call "RESPONSE.redirect('index_html')" as the VERY FIRST LINE of the DTML Document. But the problem still occurrs!! This just makes NO sense. System: RedHat 6.1 Zope 2.1.6 Have a better one, Curtis. Error page: Zope Error Zope has encountered an error while publishing this resource. TypeError Sorry, a Zope error occurred. Traceback (innermost last): File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/Zope-2.1.6-src/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: register) File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: register) File /usr/local/Zope-2.1.6-src/lib/python/OFS/DTMLDocument.py, line 166, in __call__ (Object: register) File /usr/local/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: register) File /usr/local/Zope-2.1.6-src/lib/python/OFS/DTMLMethod.py, line 146, in __call__ (Object: standard_html_header) File /usr/local/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: standard_html_header) TypeError: too many arguments; expected 2, got 3 ___ 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] trailing whitespace optimization
On Tue, 11 Jul 2000, Paul Abrams wrote: I'm noticing that our file sizes could be reduced by 10% or more by trimming trailing whitespace. Is there a way to get Zope to do that automatically? It would be best if Zope did it whenever a method was saved. Agreed. I have found that reformatting can save much space. However, sometimes you might actually WANT those spaces there. I know, HTML is supposed to ignore whitespace, but there could be various reasons you would want to keep trailing spaces. Really, your best solution is to stop being to slack, and remove the spaces yourself! (o8 Thanks in advance, -Paul Have a better one, Curtis Maloney. dtml-var standard_work_disclaimer ___ 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 DateTime.py
On Fri, 07 Jul 2000, Rajil Saraswat wrote: Hi, I am a newbie to zope and squish. My squishdot starts giving errors after midnight. the offending error is Unrecognised Time Zone in DateTime.py I am on GMT+530(India). As i donot know python, can you please tell where i should add this timezone in DateTime.py, so this problem is resolved. The patch file i supplied can be applied to /lib/python/DateTime/DateTime.py If you don't have the unix tool 'patch', you could add the lines manually, at the lines mentioned at the top of the patch file. This is, i should have mentioned, made against zope 2.1.6 From a quick perusal of the source code, it looks like there is no GMT+0530 supported currently, nor does the word "india" appear, except in the word 'Indiana'. A minor oversight, I'm sure. If you are feeling brave, you could try adding your timezone to the _zlst array, at about line 163 in DateTime.py, then restart ZOPE. Thanks Rajil Saraswat Have a better one, Curtis. ___ 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] wrong day
On Mon, 10 Jul 2000, Marco Mariani wrote: Ok, silly me, the date is stored ok, but is reported wrong: Idtml-var data fmt="%Y/%m/%d"/IBR gives me 1999/12/31 instead of 2000/01/01 Almost certainly, your problem is GMT. The time is stored GMT, and you are not countering it. Try printing the time as well, to make sure. Have a better one, Curtis. dtml-var standard_work_disclaimer ___ 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] Is Zope slow?
On Thu, 06 Jul 2000, Firestar wrote: Hi, thanks for your comment. Absolutely. Apache is many times faster than Zope. (Don't know much about AOLserver, but anything with AOL. :) However, Apache can't do squat compared with Zope when it comes to dynamic content. Not true. I have been programming using PHP and PERL, and together with Apache(DSO) they are quite fast. They do offer sessions tracking, authentication, database API + other features. It's just that due to the increasing 'hype':) on Zope and the vast array of features that it seems to offer, i'm sort of "attracted" by it:) ahem As I said, compared with Apache, for static content, it is slow. However, just like with CGI, PHP, and various other technologies, ZOPE can work through Apache. As I've had to tell many of my friends, once I became a ZOPE convert, Zope does not allow you to do anything you can't already do, but it makes those things SO much easier. (o8 Of course if i have time, i will play ard with it and see how good it is. Problem is that time is not really on my side and i need to decide on my next development tool fast(i have yet to try out other stuff e.g. ASP, JSP, Servlet..) I heard that the learning curve for Zope is quite steep, plus the documentation is not(?) that comprehensive, compared to e.g. PHP. What are your comments though? i may be wrong here... Well, I find that Zope allows a MUCH quicker development cycle, along with various other advantages, such as remote edit of pages from any browser on the net. Yes, the documentation is lacking. However, IMHO, a competent programmer (especially one with a decent grasp of OO) will pick it up quickly with just a couple of reference documents. (The Zope Quick Reference comes to mind :) A friend of mine was a hardcore PHP nut, before I introduced him to Zope, and was amazed at how simple it made work. I think the thing that slowed his learning of zope the most was often expecting solutions to problems to be complex. regards, firestar By all means, try it out. And when you're done, tell us what you think. What you like, where you think other technologies win out, and why. Zope is developing quickly, and the features are easy to add because of the open nature of the project, and the whole product system. Have a better one, Curtis Maloney dtml-var standard_work_disclaimer ___ 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 )