RE: [Zope] 2.2b3 and INSTANCE_HOME problem
> -Original Message- > From: Evan Simpson [mailto:[EMAIL PROTECTED]] > Sent: Saturday, July 01, 2000 2:02 AM > To: Ron Bickers; [EMAIL PROTECTED] > Subject: Re: [Zope] 2.2b3 and INSTANCE_HOME problem > > > - Original Message - > From: "Ron Bickers" <[EMAIL PROTECTED]> > > It's not looking in the right place for the image file in > XMLDocument. You > > can see that if found the XMLDocument product in INSTANCE_HOME/Products > (of > > course, or it wouldn't have tried to install it in the first place). > > > Is this a bug, or do I need to set some other variable, or what? > > It's a bug. I've been tracking down and squishing a few in corners where > INSTANCE_HOME wasn't properly taken into account, but I hadn't gotten to > XMLDocument yet. This should be fixed in CVS shortly (and the > next release > of Zope). Great! Thanks! For now, I just made links in the zope installation to the products so that when it needs to find stuff, it can. ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RFC: is this the best way to make a referal app and a "jump"nav menunav menu
Basically i would like people's opinions as to whether i built these things in the "right" way or not. tia! >jump menu *created a selection list and told it to pass a variable (the url of the selected item) called "url" to a method called "jump" which consists of the following: its a little slow but it works :-) >referral product (as in http://www.recommend-it.com/) i pass the variables on the first page (where people enter name, email, and up to 5 of their friends email addresses) to a method called success here's the problem i think: since i am enabling people to email up to 5 friends, i've got 5 copies of the same email message in the success method inside the sendmail tags. the last 4 are in if statements. i know there must be a better way but i really have no idea. any help? (btw if anybody wants to use these things just email me and ill send you the terribly simple yet useful code. :-) tia! Regards, G e o r g e D o n n e l l y [EMAIL PROTECTED] http://www.LetsJapan.com/ Share Your Experiences, Learn From Others' ! ___ 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] 2.2b3 and INSTANCE_HOME problem
- Original Message - From: "Ron Bickers" <[EMAIL PROTECTED]> > It's not looking in the right place for the image file in XMLDocument. You > can see that if found the XMLDocument product in INSTANCE_HOME/Products (of > course, or it wouldn't have tried to install it in the first place). > Is this a bug, or do I need to set some other variable, or what? It's a bug. I've been tracking down and squishing a few in corners where INSTANCE_HOME wasn't properly taken into account, but I hadn't gotten to XMLDocument yet. This should be fixed in CVS shortly (and the next release of Zope). Cheers, Evan @ 4-am & digicool ___ 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] Removing part of a string (in an URL)
Hi, more newbie questions, I am afraid. I have a ZCatalog result form that boringly forms links this way: Due to the way my site is organized, the URL I get has an unwanted part at the beginning. The part is always the same size, and the same string in fact. How do I remove it ? For example, the URL is http://zorba.com.mx:8080/Zorba/busca/Zorba/cacharrito/prueba ^ and I would like to cut it here | and turn it into /Zorba/cacharrito/prueba The problem is that the URL above is still valid, but if I do another search then the same /Zorba/busca gets added, and it gets longer and longer, besides messing up my breadcrumb trail. I tried using a regular expression method, but I do not really know Python (not yet !), so it did not work. Thank you very much Walter -- Vita brevis, ars longa, occasio celeris, experimentum periculosum, judicium difficile. Attention: Un train peut en cacher un autre -><- Eris aprueba este email ! -><- http://redescolar.ilce.edu.mx ___ 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] 2.2b3 and INSTANCE_HOME problem
Using the instructions at http://www.zope.org/Members/4am/instancehome on how to run multiple zopes with the same install, I semi-successfully have two instances of 2.2b3 running. However, when I run them, I get the following traceback for XMLDocument (INSTANCE_HOME is /home/zopdev/zope in this case): 2000-07-01T04:37:22 ERROR(200) Zope Couldn't install XMLDocument Traceback (innermost last): File /usr/local/zope-2.2b3/lib/python/OFS/Application.py, line 467, in install_products (Object: ApplicationDefaultPermissions) (Info: XMLDocument) File /home/zopedev/zope/Products/XMLDocument/__init__.py, line 102, in initialize File /usr/local/zope-2.2b3/lib/python/App/ImageFile.py, line 110, in __init__ IOError: [Errno 2] No such file or directory: '/usr/local/zope-2.2b3/lib/python/Products/XMLDocument/xml_element.gif' It's not looking in the right place for the image file in XMLDocument. You can see that if found the XMLDocument product in INSTANCE_HOME/Products (of course, or it wouldn't have tried to install it in the first place). I get other IOErrors when I try to add or manipulate objects where Zope is looking in the wrong place for dtml files or whatever. Everything works as far as I can tell when browsing the site itself. Is this a bug, or do I need to set some other variable, or what? ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] PCGI Error: (102) failure during connect to ZServer
hi there! altho i used that same howto to get msyelf set up ive decide that it is not the best way. im not sure what the problem is in this case but i would rec running zope off zserver directly on port 8080 instead of that pcgi stuff. thats what im doing now. btw did you restart zope after setting up the htaccess? im guessing you did but i made this mistake more than once. hth Regards, G e o r g e D o n n e l l y [EMAIL PROTECTED] http://www.LetsJapan.com/ Share Your Experiences, Learn From Others' ! > This is with Zope-2.2.0b3-src.tgz > > The pcgi wrapper reports ...is unable to connect to the ZServer > background process via Unix socket .../var/pcgi.soc > > I am trying to install this on a remote host, this error came up > locally too, though. > > I followed glndspud's howto on 3rdparty host setup. With a 2.1.6 > release I was able to get zope running. However, with this setup I > was not able to login through manage, the authorization did not work. > So my reasoning, an upgrade should make this error vanish. Not so, > until now. ;-( > > Christian ___ 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] Oracle 8i problem: OCIEnvInit failed
I'm having trouble figuring this out - I've got a zope 2.1.4 server that I'm trying to get to work with DCOracle 1.3.1 b1, ZOracleDA 2.2.0 b1, Oracle 8i client and Oracle 8 server on a RH 6.1 Linux machine. The DCOracle test routine *does* work - it connects and says as much. Within Zope I'm getting some frustrating behavior however. I'm starting Zope with the "start" script in an environment that has ORACLE_HOME set just as it was for the DCOracle test script. The product looks OK in the control panel. I can make an instance of it, but if I have "connect immediately" turned on Zope *dies* and I get "OCIEnvInit failed, oci_8.c:220" in the terminal that I started Zope on. If I have "connect immediately" turned off, I can create the instance. But whenever I try to connect I get the same problem - Zope dies with the OCIEnvInit failed error. Any clues folks? I'm seriously pressed for time here - anything you have would be most appreciated! Thanks, Dave Parker begin:vcard n:Parker;Dave tel;home:408 230 0009 x-mozilla-html:FALSE url:http://addiction.daveparker.org org:NOCPulse adr:;;660 Bair Island Rd #38;Redwood City;CA;;USA version:2.1 email;internet:[EMAIL PROTECTED] title:Principal Engineer x-mozilla-cpt:;-10464 fn:Dave Parker end:vcard
[Zope] Unique id product
Hi, I want to develope a unique sequence id generator product, I have the following code def newid(self, increment=1): """ return new id """ self.counter = self.counter+increment return self.counter I am not quite sure if this works when more than one process asking for a newid concurrently. Is that zodb automatically serial all transaction? BTW, how can I obtain a local copy of the zodb uml model? Rgs, Kent Sin - kentsin.weblogs.com kentsin.imeme.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] Authentication, Anonymous and Public
I thought the same. Perhaps the use of NT User causes this? Since the browser has the credentials to authenticate to NT and the higher folders are not aware of the NT User Folder... Seems the only solutions are to use the NT User Folder at the root level. Thanks > > -- > > From: Dieter Maurer[SMTP:[EMAIL PROTECTED]] > > Sent: Friday, June 30, 2000 4:40:26 PM > > To: Capesius, Alan > > Cc: [EMAIL PROTECTED] > > Subject:Re: [Zope] Authentication, Anonymous and Public > > Auto forwarded by a Rule > > > Capesius, Alan writes: > > I'm running into a problem after implementing jcNTUserFolder in a > > subfolder of my site. Users can access the root level or particular > > subfolders anonymously. Once a user accesses the protected > > NTUserFolder, the credentials are saved in the browser. If the user > > then returns to the anonymous area, they can no longer access th > > folder due to the browser credentials. > > > > Does Zope have a mechanism equivalent to the Novell NDS Public access? > > that is to say: > > > > Anonymous = not authenticated. > > Everyone = authenticated users (that are members of the group) > > Public = authenticated and anonymous users. > > In Zope, each user has a set of roles. > Any user has the "Anonymous" role. Log-in users may have > additional roles. > > Thus, what you see, should not happen. > > > Dieter > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Why can't I subclass a ZSQLMethod?
I tried that. You can't add a ZSQLMethod unless there is a connection for it to connect to. There isn't a connection in the products area. Actually If I put a dummy gadfly connection in the Product folder, I can indeed add a zsql method to my ZClass. However I can't get a view to it. I can configure it as a view, but it doesn't show up in the management tabs. I guess it may be possible to leave it invisible and use other methods to set the query, arguments, and database connection. More digging through the .py files! -- cary > > Why don't you create a ZClass and make the ZSQLMethod to be one of its > methods? Then the ZClass can provide the user interface to the SQL > query and the result set. > > Regards, > Ivan Raikov > > "Cary O'Brien" <[EMAIL PROTECTED]> writes: > > > I want to wrap a presentation layer around ZSQLQueries, so that > > they will have methods to generate an input form [1] for the query, > > and generate tabular results if so desired. > > > > I tried to create a ZClass to do this, but I can't subclass from a > > ZSQLMethod. > > > > Any other ideas on how to do this (besides a class where you have > > to tell it the ZSQLMethod to use)? > > > > -- cary > > > > [1] Using sql.arguments_str to find out the arguments. Finding THAT was > > a struggle! > > > > > ___ 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] How to cope with International characters / Zclass / property sheets...
Hi there.. Have anyone had problems with getting /345 etc. codes in their output? I get that when I try to "print" objects with texts after searching the items in ZCatalog .. .. could anyone give me any clues of how to solve this? Would be very happy if you could assist somehow! Kindest, Jørgen Skogstad ___ 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] Search Interface
David Trudgett writes: > I'm having some trouble setting up a search interface into a ZCatalog. I > want to create a text index on the contents of my DTML documents, but I > can't seem to get it to work. It search on title just fine. I think my > problem is that I don't know how to create the right index, and what to > call it (how the body or text of a DTML document is referenced). Can anyone > enlighten me about this? I might be going blind, but I haven't come across > anything in the documentation so far that answers my question. I'm about to > resort to reading the Zope source! (which I think I will need to do sooner > or later anyway, to get a better understanding of how it all works). The DTML content can be indexed under the name "PrincipiaSearchSource". Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: ZODB or not ZODB?
Rogerio Atem de Carvalho writes: > Dieter Maurer writes > > the Zope world via LocalFS. > > I use ZCatalog to catalog objects in the file system included into > > the Zope world via LocalFS. > > How do you do to cache those objects, since LocalFS > referenced objects are not cached by Zope? ZCatalog only requires the objects being URL addressable; cachability is not an issue. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZCatalog Proximity Search (was: RE: [Zope] ZODB or not ZODB?)
Eric L. Walstad writes: > // I use ZCatalog to catalog objects in the file system included into > // the Zope world via LocalFS. > // Minor patch to LocalFS needed. Everything works with the exception > // of proximity searches. > Q1 - What is a "proximity search" and when would one be used? Proximity searches are searches for terms that are near in the document. ZCatalog uses "..." as near operator. It implements a proximity search as an "and" search and assigns the document a relevance that is inverse proportional to the distance of the term occurrences. > Q2 - Where can I find the minor patch you mentioned? I just searched > Zope.org and didn't see it. URL:http://www.handshake.de/~dieter/pyprojects/zope/near.pat The patch fixes Zope 2.1.6 ZCatalog's "near" operator. It will work only for Zope 2.1.6. ZCatalog is a development hotspot. Lots have changed in the CVS and for Zope 2.2. Maybe, a patch is no longer needed for Zope 2.2. URL:http://www.handshake.de/~dieter/pyprojects/zope/localfs.pat is the small patch for LocalFS. It gives LocalFS the necessary infrastructure, that Zope's "find" machinery works for it. This machinery is also used by ZCatalog. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] queries and tiny tables and python methods... oh my!
Timothy Wilson writes: > The problem is hooking them all together. Passing the query to a > PythonMethod is throwing up the following error: > > Error Type: TypeError > Error Value: argument l: expected read-only character buffer, instance found > /usr/local/src/zope/Zope/lib/python/Products/PythonMethod/PythonMethod.py, > line 168, in __call__ > (Object: parseLocation) > (Info: ((['SB_B208'],), {}, None)) > File , line 2, in parseLocation > TypeError: (see above) > > OK, it looks to my relatively inexperienced eyes that the Python Method > isn't getting an argument of the type is expects. Correct. Instead of a string, it gets a class instance. > > > > # 'building' comes from the Tiny Table > > "l" should be a string but it seems to be an instance. Where does "l" come from? > I'd appreciate it if anyone has any ideas about this. I'm probably making > the whole thing too complicated, but for reasons of code reuse, this seemed > like the most efficient approach. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] File upload failure. Help needed.
Urvashi Singh writes: > I am a new user of Zope. I have Zope--linux2-x86.tar.gz bundle installed > on my Linux machine, up and working. While I was trying to create a simple > page using dtml files, I wanted to upload a few files from my hard drive > onto Zope database. When I choose the Browse button to select a file from > the targeted directory and say "Add", I get an error message: > >"The document contacined no data. > Try again later, or contact the server's administrator." This message comes from your browser not from Zope. The browser has received an empty HTTP response. This usually happens, when Zope dies during a request. You may trie to look at the error messages of the Zope process (standard output, standard error) and the ZServer log in "var/Z2.log". Maybe, this gives you a hint about this strange behaviour. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Namespace question
Rogerio Atem de Carvalho writes: > folder1 > | > folder11 > | > folder111 > > I have some objects in folder111 which I want to pass > as parameters to a dtml method in folder1 (two levels > above). I tried something like: > > > qry_item='par1',qry_table='par2', list_name='par3')"> > > > > where par1 and par2 are strings and par3 is an object > in folder111. mtdCreate is in folder1. it doesn't > work... You do not pass the objects "par1", "par2" and "par3" but the literal strings 'par1', 'par2' and 'par3'. At least for "par3", this will not be what you want. Try: I.e., remove the quotes from "par3" (maybe the other "par", too). Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL Select Statements
Michael Blewett writes: > Select Column1, Column2 etc > from TableA. > > Instead I must use the AS statement ie > > Select Column1 AS Column1, Column2 AS Column2 > from TableA. Zope should not be responsible for this strange behaviour. It simply executes the SQL statement and asks the result for the result column names. It then wraps each result row in an object that allows to access a column value as attribute under the respective column name. You could try: to get the list of column names your Z SQL Method "SQLMethod" returns. This may give you a hint how your database names result columns. I recently found out that Oracle returns column names converted into all uppercase. I needed about 2 hours to analyse this weird behaviour. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Authentication, Anonymous and Public
Capesius, Alan writes: > I'm running into a problem after implementing jcNTUserFolder in a > subfolder of my site. Users can access the root level or particular > subfolders anonymously. Once a user accesses the protected > NTUserFolder, the credentials are saved in the browser. If the user > then returns to the anonymous area, they can no longer access th > folder due to the browser credentials. > > Does Zope have a mechanism equivalent to the Novell NDS Public access? > that is to say: > > Anonymous = not authenticated. > Everyone = authenticated users (that are members of the group) > Public = authenticated and anonymous users. In Zope, each user has a set of roles. Any user has the "Anonymous" role. Log-in users may have additional roles. Thus, what you see, should not happen. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: importing text files
> I have a file object (a text file) in my project that is displayed in a dtml > document. Is there a way to make that object dynamic, i.e. when a user > changes the file (in notepad, or something) and saves it, those changes are > reflected next time the dtml document is loaded. > > When I started the project I was operating under the assumption that a file > object was a link to the object, not a static snapshot of it - silly me. You can try the LocalFS product. This product reads a file from the file system and constructs a Zope object from it each time the object is requested. http://www.zope.org/Members/jfarr/Products/LocalFS/ --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Multiple clicks: how to handle them?
Hung Jung Lu wrote: > This must be a well-known problem: you click multiple times on a form > button, and multiple requests are send to the server. On many websites they > ask you not to click on the "confirm purchase" button twice, because > otherwise you'll be charged twice. I've heard a suggestion I like a lot: send a hidden field in the form with a random but discernably unique value. When handling the form submission, before performing any other processing check whether that random value has already been copied to a small, persistent list. If the value is not there yet, add it and continue processing. But if the value is found, either stop the processing abruptly or somehow attach to the thread which is doing the processing and return its contents when it's finished. Note that you should not use ZODB persistence to store the list because each thread gets an independent view of the object database. The values should stay in the list for a few seconds beyond the end of the transaction, so you'll have to implement a basic garbage collection scheme. Shane ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Multiple clicks: how to handle them?
One site I have seen uses javascript on the client side: you get a dialog box that pops up on-click, tells you to only click once. Since the dialog is modal, if you did click twice it (did whatever your platform does when you have a modal dialog box up, eg beeps at you). (yes, of course, it'd be nice to have a solution requiring javascript, but I bet you that the people dumb enough to double click the submit button are the people with javascript on... =) jim -- Jim Hebert http://www.cosource.com/ [EMAIL PROTECTED] The cooperative market for open source software "Well actually I was considering opening a market in flying pigs. Mostly because it would be more practical" -- Alan Cox ___ 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] Messing with the namespaces stack [Was: (no subject)]
Jim Hebert wrote: > > fundamental changes more easily. Have you learned about property sheets > > yet? They are the key to success with ZClasses. > > Nope, where shall I go to read the fine manual on those? I'm not sure, but let me just give you enough info to get started. ZClasses have a "property sheets" tab where you can add sheets. Group relevant properties together. Then go to the ZClass "Views" tab and add your property sheets to the list of views of your objects available through the management interface. Voila--not only do your class instances have configurable properties with defaults, but the management interface lets you set them. And the effort required was minimal. > Yeah, this is the part of acquisition that I _get_, but just shy away > from for some reason. I need to get over that, because this is probably > one of the coolest things about acquisition. I also avoid it because its behavior is not completely obvious, thus even if I understand it, someone else who has to maintain my work later may shoot him/herself in the foot with the bullet I've provided! > Thanks so much, I hope others on the list are profiting from this exchange > as much as I am! Thanks for a nice Friday discussion. Shane ___ 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] Multiple clicks: how to handle them?
Hi, This must be a well-known problem: you click multiple times on a form button, and multiple requests are send to the server. On many websites they ask you not to click on the "confirm purchase" button twice, because otherwise you'll be charged twice. Of course, browsers are to blame for this fault. I can't believe Internet Explorer and Netscape are both faulty at this (on Windows platform), but that's the sad reality. (What the heck where these programmers thinking when they made the form requests non-blocking?!!) Anyway, how can one handle the problem from the server side? Session management is an obvious candidate. Every time you receive a request, you set a busy flag, and dump all the following requests, until the first request is properly finished. But this has two problems: (1) You'll see on your browser the response to your last request, not to your first request. (2) If you use RESPONSE.redirect(), your session is locked up. Of course I can go down into the transaction manager level of Zope and do things from there. But I'd like to know how other people handle the multiple click problem. Is there any easy way out?! regards, Hung Jung Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MySQL transaction support (was: MySQL Select Statements)
> -Original Message- > From: Andy Dustman [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 30, 2000 4:08 PM > To: Ron Bickers > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [Zope] MySQL transaction support (was: MySQL Select > Statements) > with BDB tables. But it may be possible to break things down as having a > DA for 3.22 and one for 3.23. Which is, in practice, may not be any > different than having one that is not transactional (3.22 never is) and > one that is transactional (3.23 sometimes is). What I want to avoid is having to create two different "MySQL database connections" where I have to choose the "correct" one based on whether or not my SQL method is using transactions or not. I'll most likely only be using one version of MySQL at a time, but if I'm using transactions at all, there's a good chance not all of my tables will support them. I guess we'll just have to do some testing. ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Programattically adding roles
I know how to add users programatically, but I am having a difficult thing finding out how to add roles programatically. I have a list of user defined roles that I would like to add, but am unsure how to do it within DTML or an external method. Please note that I am *not* trying to assign roles to users here, I am just trying to add roles to the system. -- Stand Fast, tjg. Timothy Grant [EMAIL PROTECTED] Chief Technology Officer www.exceptionalminds.com Red Hat Certified Engineer (503) 246-3630 Avalon Technology Group, Inc. fax (503) 246-3124 Linux...Because crashing isn't normal< ___ 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] Messing with the namespaces stack [Was: (no subject)]
On Fri, 30 Jun 2000, Shane Hathaway wrote: > It's a great idea but I've had some thoughts on this myself. I think > the approach I would take is to create a ZClass. Content authors would Oooh, I like that idea a lot. Solves lots of problems, most notably the hackery I currently do with the searching stuff: The search results come up with urls like http://www.vistasource.com/body, which ain't right, so I do a bunch of munging to make the urls right. Also sounds like work, but hey, I suppose it's about time I earn that salary... =) > fundamental changes more easily. Have you learned about property sheets > yet? They are the key to success with ZClasses. Nope, where shall I go to read the fine manual on those? > visits /home/lowres/content/index_html, they get the lowres style. (I understand this now, modulo the other post from Jeff.) Yeah, this is the part of acquisition that I _get_, but just shy away from for some reason. I need to get over that, because this is probably one of the coolest things about acquisition. > Zope is like a collection of Legos (TM): you're given a bunch of blocks > and some instructions on how to build some specific models, but > encouraged to explore putting them together in new ways. Have you > heard of the Lego Machine Gun? :-) Yeah, funny you should mention it. I was just looking at the web page for it like 2 weeks ago. And I like the analogy. =) Thanks so much, I hope others on the list are profiting from this exchange as much as I am! jim -- Jim Hebert http://www.cosource.com/ [EMAIL PROTECTED] The cooperative market for open source software "Well actually I was considering opening a market in flying pigs. Mostly because it would be more practical" -- Alan Cox ___ 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 can't I subclass a ZSQLMethod?
Why don't you create a ZClass and make the ZSQLMethod to be one of its methods? Then the ZClass can provide the user interface to the SQL query and the result set. Regards, Ivan Raikov "Cary O'Brien" <[EMAIL PROTECTED]> writes: > I want to wrap a presentation layer around ZSQLQueries, so that > they will have methods to generate an input form [1] for the query, > and generate tabular results if so desired. > > I tried to create a ZClass to do this, but I can't subclass from a > ZSQLMethod. > > Any other ideas on how to do this (besides a class where you have > to tell it the ZSQLMethod to use)? > > -- cary > > [1] Using sql.arguments_str to find out the arguments. Finding THAT was > a struggle! > > ___ 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] Messing with the namespaces stack [Was: (no subject)]
"Jeff K. Hoffman" wrote: > Therefore, when index_html looks for header, the content folder is > searched, then the home folder, then the lowres folder, then the home > folder. Unfortunately, for our example, the header is found in the search > of the home folder, and we never make it to the lowres folder. Oops--thanks for pointing that out. I sometimes wonder, however, why it was set up this way. Except for speed concerns, I see no reason why, if we set up the algorithm a different way, it couldn't search from right to left. A simple approach would be like this: def findattr(obj, name): while (obj is not None): base = getattr(obj, 'aq_base', obj) if hasattr(base, name): return getattr(obj, name) obj = getattr(obj, 'aq_parent', None) raise AttributeError, name > Hope this makes sense. Acquisition is not one of the things I have become > good at explaining, yet. The slides from Jim's Acquisition Algebra talk is > about the best source of information on this subject. Of course, Jim would probably look at my example and want to hit me. He likes things to be optimized. :-) Shane ___ 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: Messing with the namespaces stack
On Fri, 30 Jun 2000, Hamish Lawson wrote: > Jim, that is indeed clever. Am I right, however, in thinking that every > DTML method or DTML document that wants this additional-parent > behaviour will need to use these wrappers? I think what I'm > after is the ability to alter the parents of the containing folder > itself, so that any contained method automatically has this modified > acquisition path. Yes. I sorta expected someone to point that out, which is part of the reason I posted my other, longish post, which shows among other things that I only have that double-dtml-with in one place, the toplevel index_html. So, it may not be ideal for other design patterns. jim -- Jim Hebert http://www.cosource.com/ [EMAIL PROTECTED] The cooperative market for open source software "Well actually I was considering opening a market in flying pigs. Mostly because it would be more practical" -- Alan Cox ___ 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] get 2 properties at the same time
Hello, I need get 2 properties of Zclass at the same time. [rh]Unless I understand your question wrongly, this is going to be more easy then you think (sidenote that this dtml-in is iterating the objects in Locality, not the properties) I need get another property, for example MASTER_REGION, in this moment. [rh]Just call it (doesn't matter whether it's an object or a property - as defined in a ZCLass Propertysheet) If you want to do the same thing as with the Locality objects, just repeat your code here. If you want to do something else, you'll have to rephrase your question. hth Rik ___ 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] Accesing a new context from a manipulated string
>Here's my problem: > >given a method itemURL(), that typically returns a site >relative URL such as '/about/', I need to change to the >appropriate directories context using . > >In short I need to do the equivalent of . > >The closest I've gotten so far is: > > > >which generates a KeyError: /about/ in the traceback. > >Can anyone help me truncate the extra '/'s off of this >string and pass it to the ? > This is going to be awkward in DTML, but it can be done. But there may be some different cases (all untested): simplest case '/about/' : strippedURL -> 'about' more intricate case '/about/whatever/' strippedURL -> 'about.whatever' or, more convoluted if you're not certain if your itemURL has a starting and a trailing /, you will have to make this conditional. You're better off using a PythonMethod then. hth Rik ___ 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 can't I subclass a ZSQLMethod?
ZSQLMethod is not registered as a base class. I dont know why, but you could try changing it in the init.py... But Im sure there is a good reason why it isnt. - Original Message - From: "Cary O'Brien" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 30, 2000 12:59 PM Subject: [Zope] Why can't I subclass a ZSQLMethod? > > I want to wrap a presentation layer around ZSQLQueries, so that > they will have methods to generate an input form [1] for the query, > and generate tabular results if so desired. > > I tried to create a ZClass to do this, but I can't subclass from a > ZSQLMethod. > > Any other ideas on how to do this (besides a class where you have > to tell it the ZSQLMethod to use)? > > -- cary > > [1] Using sql.arguments_str to find out the arguments. Finding THAT was > a struggle! > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MySQL transaction support (was: MySQL Select Statements)
On Fri, 30 Jun 2000, Ron Bickers wrote: > > That's the problem: They don't get control over when BEGIN/COMMIT/ROLLBACK > > are used. Zope does that if you are using the Transaction Manager. And the > > only way to control use of the Transaction Manager is by > > selection of DA. > > > > That's why I think it may be necessary to have two ZMySQLDAs: One which is > > transactional and one which is not. However, they can both be part of the > > same distribution, and the transactional one can simply subclass the > > non-transactional one (mixing in the TM base and adding the required > > methods), so there is not a lot of code duplication. > > I see. So how would this affect use of transaction and non-transaction > supporting tables? Would two separate database connections be required > where the SQLMethod must use the correct connection depending on transaction > support? > > Making assumptions is bad, but suppose MySQL 3.23 does something elegant > with BEGIN/COMMIT/ROLLBACK attempts on non-transaction supporting tables > (like return a "table does not support transactions" or simply ignores that > statement). Could we then just have one DA for 3.22 and another for 3.23, > where the 3.23 DA handles transactions, but silently ignores them when > dealing with non-transaction tables? These are good questions. But I don't have good answers yet. I tried BEGIN and COMMIT when I didn't even have a database selected, and it took it. It may silently accept ROLLBACK when rollback is impossible, or it may raise an error. I haven't done that much testing with MySQL-3.23 yet, and none with BDB tables. But it may be possible to break things down as having a DA for 3.22 and one for 3.23. Which is, in practice, may not be any different than having one that is not transactional (3.22 never is) and one that is transactional (3.23 sometimes is). -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d "Therefore, sweet knights, if you may doubt your strength or courage, come no further, for death awaits you all, with nasty, big, pointy teeth!" ___ 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] Messing with the namespaces stack [Was: (no subject)]
On Fri, 30 Jun 2000, Shane Hathaway wrote: > Also remember you can play tricks with acquisition. If you have a > "default" style and a "lowres" style, you can set up your directories > like this: > > /home > /lowres > /content > > "lowres" and "content" are both children of "home". The default style > elements are in home. When the user browses to > /home/content/index_html, they get the default style. When the user > visits /home/lowres/content/index_html, they get the lowres style. This is, actually, not quite right. Given the following hierarchy: /home header footer /content index_html /lowres header footer and a request of /home/content/index_html, we have the following acquisition path (assuming index_html is a DTML Method): /home/content= (content of home) /home/content/index_html = (index_html of (content of home)) Assuming index_html contains: Content. when index_html asks for header, the acquisition path is searched from left to right; the content folder is searched first, followed by the home folder, where header is found. Now, with a request of /home/lowres/content/index_html, we have: /home/lowres= (lowres of home) /home/lowres/content= ((content of home) of (lowres of home)) /home/lowres/content/index_html = (index_html of ((content of home) of (lowres of home))) Therefore, when index_html looks for header, the content folder is searched, then the home folder, then the lowres folder, then the home folder. Unfortunately, for our example, the header is found in the search of the home folder, and we never make it to the lowres folder. If, instead, we structure the request as /home/content/lowres/index_html, we have: /home/content = (content of home) /home/content/lowres= ((lowres of home) of (content of home)) /home/content/lowres/index_html = (index_html of ((lowres of home) of (content of home))) When index_html looks for header, we search lowres, then home, then content, then home. The header is picked up from lowres, which is what we want. Hope this makes sense. Acquisition is not one of the things I have become good at explaining, yet. The slides from Jim's Acquisition Algebra talk is about the best source of information on this subject. > Shane --Jeff --- Jeff K. Hoffman 704.849.0731 x108 Chief Technology Officer mailto:[EMAIL PROTECTED] Going Virtual, L.L.C. http://www.goingv.com/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Why can't I subclass a ZSQLMethod?
I want to wrap a presentation layer around ZSQLQueries, so that they will have methods to generate an input form [1] for the query, and generate tabular results if so desired. I tried to create a ZClass to do this, but I can't subclass from a ZSQLMethod. Any other ideas on how to do this (besides a class where you have to tell it the ZSQLMethod to use)? -- cary [1] Using sql.arguments_str to find out the arguments. Finding THAT was a struggle! ___ 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] Cut support
Heres a wierd one: I have a class inherited off of DTMLDocument. The object's I create from can be happily copied, deleted, renamed and pasted in pretty much any order. But when I do a cut then paste I get an error message relating to ac_acquire I guess trying to get hold of the absolute_url (for cataloging purposes). I assumed a cut and paste would be a copy, delete, paste in that order. Put in would appear not to be, since I can do that by hand. Thanks in advance. ___ 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] Question from ZopeNewbies poster. . .
On Fri, Jun 30, 2000 at 10:13:37AM -0500, [EMAIL PROTECTED] wrote: > problem is I can't insert the image at the insert form, and worse of all I > don't know how to start. define your HTML form as: Filename: then in your_dtml_method REQUEST['file'] should contain your file contents IIRC. good luck Jerome Alet ___ 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] Accesing a new context from a manipulated string
Here's my problem: given a method itemURL(), that typically returns a site relative URL such as '/about/', I need to change to the appropriate directories context using . In short I need to do the equivalent of . The closest I've gotten so far is: which generates a KeyError: /about/ in the traceback. Can anyone help me truncate the extra '/'s off of this string and pass it to the ? Michael Bernstein. ___ 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] Kid clicking and Zope thread deadlock
>From: Brian Lloyd <[EMAIL PROTECTED]> >The quick way to determine this: install a fresh Zope without >SybaseDA installed and see if you can reproduce the kid-clicking >behavior. > >Another thing potentially to look at: there is problem with >Sybase connections that I have run into before where if you >have a request that runs a transactional query, then a non- >transactional query, then trys another transactional query >you get a hang :( I don't know if this could be the case >here, but if so you might want to look here for more info: > >http://classic.zope.org:8080/Collector/1059/view Thank you very much! My preliminary test indicates that indeed the deadlock is coming from the Sybase database adapter. Zope alone seems to be doing fine (what a relief!), even under intense bombardment of http form requests. I'll have more about Sybase deadlocking later, as I try to isolate the problem. I think the problem is not only with transaction-non_transaction interaction. The problem happens even after I connect all the Zope threads to Sybase, and use transactions for all threads afterwards. regards, Hung Jung Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] localization projects
Christian Zagrodnick wrote: >has anybody figured out how to make a zope website multilingual? There is ZIP - "A developer's group to make Zope more international." Their maillist is at http://www.eevolute.com/mailman/listinfo/zip Sadly, looking at the archives, it seems that the ZIP mailing list is dead. I hope it will come back to life. The only thing posted on it this month is an announcement of zzLocale, "a framework for Zope interface internationalization". http://www.zope.ne.jp/users/yemartin/zzLocale There is also Translator, that "helps with the localization of web sites built with Zope" http://www.zope.com/Members/fog/Translator Although I have not used these programs yet, internationalization will be an issue for me soon. This issue seems to come up every 6 weeks or so on [EMAIL PROTECTED] I hope to see a FAQ for this soon from someone with more experience using these packages (it's author can feel free to cut & paste this email :). I also hope to see an announcement of updates of these & newer internationalization programs in the "Zope News" and "Zope Weekly News". These would be good ways to help keep the ball rolling! cheers --== Sent via Deja.com http://www.deja.com/ ==-- Before you buy. ___ 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] MySQL transaction support (was: MySQL Select Statements)
> -Original Message- > From: Andy Dustman [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 30, 2000 1:25 PM > To: Ron Bickers > Cc: Michael Blewett; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [Zope] MySQL Select Statements > That's the problem: They don't get control over when BEGIN/COMMIT/ROLLBACK > are used. Zope does that if you are using the Transaction Manager. And the > only way to control use of the Transaction Manager is by > selection of DA. > > That's why I think it may be necessary to have two ZMySQLDAs: One which is > transactional and one which is not. However, they can both be part of the > same distribution, and the transactional one can simply subclass the > non-transactional one (mixing in the TM base and adding the required > methods), so there is not a lot of code duplication. I see. So how would this affect use of transaction and non-transaction supporting tables? Would two separate database connections be required where the SQLMethod must use the correct connection depending on transaction support? Making assumptions is bad, but suppose MySQL 3.23 does something elegant with BEGIN/COMMIT/ROLLBACK attempts on non-transaction supporting tables (like return a "table does not support transactions" or simply ignores that statement). Could we then just have one DA for 3.22 and another for 3.23, where the 3.23 DA handles transactions, but silently ignores them when dealing with non-transaction tables? ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope 2.2.0b3: can't call db_connection.query()
With Zope 2.2.0b3, I can't seem to call the query() method of a database connection any more. For example, with a PostgreSQL connection called dbconn, calling Works fine with 2.1.6, but with 2.2.0b3, I get... Zope Error Zope has encountered an error while publishing this resource. Unauthorized ... File /usr2/local/zope/Zope-2.2.0b3-src/lib/python/DocumentTemplate/DT_With.py, line 146, in render (Object: dbconn) File /usr2/local/zope/Zope-2.2.0b3-src/lib/python/DocumentTemplate/DT_Util.py, line 327, in eval (Object: query('select count(*) from pg_class')) (Info: query) File /usr2/local/zope/Zope-2.2.0b3-src/lib/python/OFS/DTMLMethod.py, line 189, in validate (Object: test1) File /usr2/local/zope/Zope-2.2.0b3-src/lib/python/AccessControl/SecurityManager.py, line 139, in validate File /usr2/local/zope/Zope-2.2.0b3-src/lib/python/AccessControl/ZopeSecurityPolicy.py, line 158, in validate Unauthorized: query Any ideas? There doesn't seem to be any permission to set. What I would like to do is add some functions to the PostgreSQL DA so I can view table names and column names. -- cary ___ 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] WebOS and Zope
Curtis Maloney writes: > > Is it possible to simulate this sort of environment in an XML client? > > > Hmm... what sort of XML client did you have in mind? I may be wrong, but I > suspect you may have made a similar mistake to most people who encounter XML. > XML is not a whole data format, in much the same way as TCP is not a whole > protocol. > > HTTP is a protocol that uses TCP, just as XHTML and DocBook are data formats > that use XML. XML allows any XML compliant parser to PARSE the contents, but > not neccesarily COMPREHEND it. > > So, a custom XML client could be built which would understand whatever I sent > it, and display the desktop accordingly. However, an 'off the shelf' XML > 'client'... who could say. > I meant a custom client. Like the Jabber situation http://www.jabber.org All my best, Jason Spisak CIO HireTechs.com 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ 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] MySQL Select Statements
On Fri, 30 Jun 2000, Ron Bickers wrote: > It should be as simple as the application designer actually knowing what > they're doing by knowing whether or not they're working with a table that > supports transactions or not, and just not using BEGIN/COMMIT/ROLLBACK when > they're not. Or is it too much to ask that designers know what they're > doing? :-) That's the problem: They don't get control over when BEGIN/COMMIT/ROLLBACK are used. Zope does that if you are using the Transaction Manager. And the only way to control use of the Transaction Manager is by selection of DA. That's why I think it may be necessary to have two ZMySQLDAs: One which is transactional and one which is not. However, they can both be part of the same distribution, and the transactional one can simply subclass the non-transactional one (mixing in the TM base and adding the required methods), so there is not a lot of code duplication. In addition, a lot of people are still going to be using MySQL-3.22, which does NOT support transactions, or even the BEGIN/COMMIT/ROLLBACK statements (these produce syntax errors). The only way to detect this at runtime is to look at the server's version. Anyway, more experimenting is needed. -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d "Therefore, sweet knights, if you may doubt your strength or courage, come no further, for death awaits you all, with nasty, big, pointy teeth!" ___ 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] get 2 properties at the same time
Hello, I need get 2 properties of Zclass at the same time. I´m using in my form : I need get another property, for example MASTER_REGION, in this moment. How can I to do it? (is urgent!) Thanks in advance, Marcus Mendes ___ 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 upload 900 files, in one shot ?
On Fri, Jun 30, 2000 at 03:05:49AM -0400, Jonathan Desp wrote: > > How I can upload 900 files inside Zope, if I want to be able to manage > > them by the Zope Interface, Using so-called "Internet programming". ;-) If you 'view frame source' when creating a Zope File object, you'll see that '', with parameters 'id', 'title' and 'file'. This means you can talk to it via http post. Executable pseudo-code <0.5 wink> follows: import urllib user = 'zope_user' passwd = 'zope_pass' folder = '/path/to/my/folder' action = '/manage_addFile' url = 'http://%s:%s@myzope:8080%s%s' % (user, passwd, folder, action) for fname in my_900_file_list: dict = {'id':fname, 'title':fname, 'file':fname} postdata = urllib.urlencode(dict) u = urllib.urlopen(url, postdata) The very act of "u = urllib.urlopen(...)" will create a Zope File object with id and title set to the filename. You don't have to do anything with "u", just loop around. Indeed, if you try, say, u.read(), Zope will prompt you for username and password. You'll probably need to make your filenames legal Zope identifiers, e.g., by stripping path separators. clicking-and-drooling-over-900-entries-is-sure-fun-ly y'rs -- Ng Pheng Siong <[EMAIL PROTECTED]> * http://www.post1.com/home/ngps ___ 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] MySQL Select Statements
> -Original Message- > From: Andy Dustman [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 30, 2000 11:42 AM > To: Michael Blewett > Cc: Ron Bickers; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [Zope] MySQL Select Statements > > It's a matter of perspective. I prefer to think of it as 0.2.2 breaks > ZMySQLDA. This is because ZMySQLDA uses _mysql, and _mysql prior to 0.2.2 > implemented fetch_row(), fetch_rows(), fetch_all_rows(), and the > ..._as_dict() variants. Thanks for clarifying that. I hope the 1.2.0 DA continues to follow your (Andy's) changes to the MySQLdb so that we can have a nice, working, stable db/DA combination. > what the solution is for this. It may be necessary to have the ZMySQLDA > package include another DA: ZMySQLTDA for transactions. The standard DA Please not two DAs just for the difference in transaction support. > Obviously the application designer will have to use the right DA for the > right table type... It should be as simple as the application designer actually knowing what they're doing by knowing whether or not they're working with a table that supports transactions or not, and just not using BEGIN/COMMIT/ROLLBACK when they're not. Or is it too much to ask that designers know what they're doing? :-) ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] importing text files
I have a file object (a text file) in my project that is displayed in a dtml document. Is there a way to make that object dynamic, i.e. when a user changes the file (in notepad, or something) and saves it, those changes are reflected next time the dtml document is loaded. When I started the project I was operating under the assumption that a file object was a link to the object, not a static snapshot of it - silly me. Thanks, Joel Grimes Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Win2000
No prob here. I had a brief problem for me with zope 2.2 beta 2 I think on Windows. That is fixed now though... what version and any more detail of the exact problem? - Original Message - From: "Robin Becker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 30, 2000 8:24 AM Subject: Re: [Zope] Win2000 > In article <[EMAIL PROTECTED]>, Jake LeBeau > <[EMAIL PROTECTED]> writes > >I'm running it here on W2K Server - I don't remember having much of a problem > >setting it up. > >I do run it as a service, and it seems to work fine. > > > >Jake LeBeau > > > Robin Becker <[EMAIL PROTECTED]> 06/28/00 04:40PM >>> > >The boss says he couldn't install Zope on our Win2000 box. He tried 3 > >times. Anybody else have a problem with M$'s latest? > yes he'd been playing with 1.5.2+ and it didn't co-operate well with > pythonservice. > > -- > Robin Becker > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Error handling and super users....
Hi Tino > My be is what you want? A dtml try works well in dtml in a file. But take an error such as "object not found" (analogous to 404) or some other error that does not specifically call a method. Or does it? This is the question I guess. Yes I use try and except's quite a bit. > Look for the options of zpasswd.py. > You can run it interactively with "python zpasswd access" > at the last step you are asked for valid domains. Oops that one was obvious. Sorry! ___ 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] Available Object List (Was Re: [Zope] GOOD)
And a "Check all" while they are at it then again 900 objects in one folder aint the best way to do things - Original Message - From: "J. Atwood" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 30, 2000 7:27 AM Subject: [Zope] Available Object List (Was Re: [Zope] GOOD) > >> they should put their "Available Object" white box, you know what I mean > >> ? ->ABOVE<- the files. See, when you have 900 files in one directory, > > > > Aye! I second that. > > I know it is bad behavior to just say "me too" and send it to the list.. > but... > > ME TOO! > > This is one of those things that would seem like it would take DC about 10 > minutes to do and would greatly improve our (Zope Programmers) lives. > > What say DC? 2.2b4? > > J > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Newbie question
Has anyone gotten Zope running on either LinuxPPC or OSX? If so, can you share your wisdom on how it was done? We'll also be looking for experienced Zope web site developers so send me your resume if interested. Thanks Jerry Jewell WebDudes, Inc. 916 624 0601 ___ 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] Proxy role bug (or feature)
Hi, I have encountered a problem with proxy roles with my product GuardedFile. A GuardedFile is a File that is accessible by proxy only. When a GuardedFile is created, all acquired permissions are unset and a proxy role is created in its container with the sole permission 'view'. In all other aspects a GuardedFile behaves like a File. Typically, the GuardedFile creator next creates a DTML method and assigns to it the associated proxy role. Anonymous and other users access the GuardedFile via the DTML method. I've discovered a problem with the product setup: Suppose user 'ngps' exists in the top-level user folder, and has the default roles 'owner' and 'manager'. 1. ngps creates a folder called 'junk' somewhere within Zope. 2. ngps switches to the folder 'junk'. 3. ngps creates a GuardedFile 'agf'. A proxy role 'proxy_for_agf' is automatically created in 'junk'. 4. ngps creates a DTML method 'view_agf' to access 'agf'. When ngps tries to assign the role 'proxy_for_agf' to 'view_agf', the following error is generated: (Slightly reformatted for readability.) You are not authorized to change 'view_agf' because you do not have proxy roles. Traceback (innermost last): File C:\pkg\Zope220b3\lib\python\ZPublisher\Publish.py, line 222, in publish_module File C:\pkg\Zope220b3\lib\python\ZPublisher\Publish.py, line 187, in publish File C:\pkg\Zope220b3\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: view_agf) File C:\pkg\Zope220b3\lib\python\ZPublisher\Publish.py, line 171, in publish File C:\pkg\Zope220b3\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: manage_proxy) File C:\pkg\Zope220b3\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: manage_proxy) File C:\pkg\Zope220b3\lib\python\OFS\DTMLMethod.py, line 273, in manage_proxy (Object: view_agf) File C:\pkg\Zope220b3\lib\python\OFS\DTMLMethod.py, line 266, in _validateProxy (Object: view_agf) Forbidden: (see above) The following works around this: 1. ngps creates a user folder in 'junk'. 2. ngps adds a user in 'junk' called 'user2', with roles 'owner', 'manager' and 'proxy_for_agf'. 3. Login as 'user2'; 'user2' is now able to assign the role 'proxy_for_agf' to the above-mentioned DTML method 'view_agf'. This proxy role handling seems unwieldy, in that 'ngps' cannot assign the proxy role but can create another user 'user2' that _can_ assign said proxy role. Is this a bug or a feature? Cheers. -- Ng Pheng Siong <[EMAIL PROTECTED]> * http://www.post1.com/home/ngps ___ 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] MySQL Select Statements
I should point out that 0.2.2 has not been fully released yet. There's a bug I have to iron out of it first. Probably next week. Also, for general MySQLdb questions, send them to [EMAIL PROTECTED] (mailing list). Or subscribe, it's low-volume and won't fatten your mailbox. On Fri, 30 Jun 2000, Michael Blewett wrote: > It's funny that you say 0.2.2 is broken. Apart from this one glitch, it > works fine for me (although from memory I think we had to do a little bit > of fiddling at install time to get it to work). It's a matter of perspective. I prefer to think of it as 0.2.2 breaks ZMySQLDA. This is because ZMySQLDA uses _mysql, and _mysql prior to 0.2.2 implemented fetch_row(), fetch_rows(), fetch_all_rows(), and the ..._as_dict() variants. This was just too much code duplication to put up with, and the new interface is fetch([n[,how]]) where n is the maximum number of rows to fetch (default 1), and how is how to return the result (0: as tuple, 1: as dictionary, other codes may be added at some point). To fix ZMySQLDA, change fetch_all_rows() to fetch(maxrows) in the query routine. One other place (to get the tables) uses fetch_all_rows(). If you insist on using 0.2.2 at this point, change that as well. 0.2.2 is marked Alpha for a reason... And when I release it, I'll include a very small patch to make things right with ZMySQLDA again (I'm treating mordred's as the official one at this point). > At 00:12 30/06/2000 -0400, Ron Bickers wrote: > >Why do you say you "must" use the AS statement? Do you get an error > >otherwise? > > > >MySQLdb 0.2.2 is broken when used with ZMySQLDA. But 0.2.1 works okay for > >me. Andy Dustman (author of the MySQLdb) said he will fix it and hinted > >that one should use the ZMySQLDA that is on Zope.org (v1.2.0 now I believe). > >Since that one now uses his MySQLdb, he will likely kill off his own DA. Quite true. Now for the AS statement: If you are joining tables with identically-named columns in common, you should use AS in your SQL to rename them. Otherwise it will return two columns with the same name to Zope, which is bad. You do not, however, need to do this: > > > Just need someone to put me straight here. When I use Select > > > statements in > > > an SQL Method I cannot simply : > > > > > > Select Column1, Column2 etc > > > from TableA. > > > > > > Instead I must use the AS statement ie > > > > > > Select Column1 AS Column1, Column2 AS Column2 > > > from TableA. > > > > > > - Michael This is just gratuitious renaming to the original name, which is not renaming at all. Here's an example of what I'm talking about. SELECT TableA.Col, TableB.Col from TableA, TableB # bad SELECT TableA.Col AS ColA, TableB.Col AS ColB from TableA, TableB # good Note that the first SELECT returned two columns named Col, which will confuse Zope, and the second returns ColA (TableA.Col) and ColB (TableB.Col). Additional compatibility note: One of the 0.2.2 changes has been to synchronize with MySQL-3.23 evolution (now at 3.23.19-beta, and GPL'd), and the big feature here is: Transactions! Yes, as of 3.23.15, transactions are in MySQL, if you use BDB tables. And yes, BDB does mean Berkeley DB, specificially the Sleepycat DB v3, which supports transactions (but probably not columns, which I presume MySQL is imposing on the database). For ZMySQLDA developers out there; MySQL-3.23 defaults to autocommit. However, there is a BEGIN SQL statement which starts a transaction and similarly for COMMIT and ROLLBACK statements. But remember: All this transactional stuff ONLY works on BDB tables. If you try to BEGIN a transaction (or turn off autocommit) on another table type, well, I'm not sure what happens. Maybe you get an error, and maybe you don't. Not sure what the solution is for this. It may be necessary to have the ZMySQLDA package include another DA: ZMySQLTDA for transactions. The standard DA would not be based on TM, and the transactional one could simply subclass the other one: # ZMySQLTDA/db.py from Shared.DC.ZRDB.TM import TM class DB(ZMySQLDA.DB, TM): def _begin(self, *ignored): self.db.query("BEGIN") def _finish(self, *ignored): self.db.query("COMMIT") def _abort(self, *ignored): self.db.query("ROLLBACK") Obviously the application designer will have to use the right DA for the right table type... -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d "Therefore, sweet knights, if you may doubt your strength or courage, come no further, for death awaits you all, with nasty, big, pointy teeth!" ___ 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] Win2000
In article <[EMAIL PROTECTED]>, Jake LeBeau <[EMAIL PROTECTED]> writes >I'm running it here on W2K Server - I don't remember having much of a problem >setting it up. >I do run it as a service, and it seems to work fine. > >Jake LeBeau > Robin Becker <[EMAIL PROTECTED]> 06/28/00 04:40PM >>> >The boss says he couldn't install Zope on our Win2000 box. He tried 3 >times. Anybody else have a problem with M$'s latest? yes he'd been playing with 1.5.2+ and it didn't co-operate well with pythonservice. -- Robin Becker ___ 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 method: Trying to be too clever?
Message-ID: <[EMAIL PROTECTED]> Priority: NORMAL X-Mailer: Execmail for Win32 5.1 Build (9) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" > > in that case you just want a (you not passing it as sql > > query values) Perfecto. That's two today. My turn to get the beers. AndyG ___ 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 method: Trying to be too clever?
Andy, An error message / traceback would be useful ;-) Rik Hoekstra wrote: > >insert into related (rootstory, ) > > in that case you just want a (you not passing it as sql > query values) Nope, the is for quoting use in SQL statements, kindof like which I think may be even be correct syntax... cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] queries and tiny tables and python methods... oh my!
>On Fri, 30 Jun 2000, Rik Hoekstra wrote: > >> > The problem is hooking them all together. Passing the query to a >> > PythonMethod is throwing up the following error: >> > >> > Error Type: TypeError >> > Error Value: argument l: expected read-only character buffer, instance found >> >> The error means you're trying to split up a string, but the argument is >> no string, but an instance (a Python Object). In many cases this is >> caused by an omission of parenthesis, like so >> >> called_object instead of called_object() > >OK, that makes sense. > >> in which case the object is referenced instead of called and nothing is >> returned (of course). I did not find the culprit in your description, >> though. > >> I do not quite get what part you want to parse. Is it 'SB_B208'? >> accessing this in python is a bit strange due to the returned value. You >> get to the 'SB_B208'part in the following way: >> >> whateverreturnstheresult()[0][0][0], meaning (in this >> case): > >I was trying to walk the fine line between providing too much detail and not >enough. Briefly, 'SB_B208' is an example of the type of string I'm trying to >parse. I do a string.split('l', '_') (where 'l' is the argument to the >string-splitting Python method) and get ['SB', 'B208']. 'SB' is one of the >two-letter codes that gets lookup up in the Tiny Table and 'B208' is an >office number. Together, these two strings represent a person's location in >our LDAP directory. > >I don't understand where the weird tuple in the traceback is coming from. > >> > Here's the code for parseLocation ('l' is the argument): >> > >> > x = string.split(l, '_') >> > return x[0] >> >> I may be reading badly, but can you explain what the l is (or is >> supposed to be)? Is it the tuple in the traceback? > >'l' is passed to the Pyton Method. Examples would be: FH_123, SB_A231, >DO_111, etc. > >> > (BTW, changing it to x = string.split(`l`, '_') eliminates the error, but >> > nothing is rendered. >> > >> > qry_person is an ZLDAP filter method that takes one argument (uid). The >> > original dtml to display this mess looks like: >> > >> > have you tried (untested of course) ? see my previous explanation. >> > >> > >> > # 'building' comes from the Tiny Table >> > >> > > >Anyone see where the problem lies? > Rik ___ 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] Question from ZopeNewbies poster. . .
I am forwarding to this list the following question asked on the ZopeNewbies discussion list today. I have told the poster about this list. You may wish to post your answer both here and on the ZopeNewbies discussion list page to make sure the poster sees your answer. Author: Kelvin, Tze Wai Cheong Posted: 6/30/00; 3:46:51 AM Msg#: 658 (top msg in thread) I'm developing a web-site which requires the storage of images in the database. I have defined this field as LONGBLOB in my database tables. The problem is I can't insert the image at the insert form, and worse of all I don't know how to start. according to the mySQL manual from mySQL.com's documentation, I should be storing the path of the picture file into the database. I have tried but ZOPE defined a floating-point error regarding the field. How should I go around this? ::: Darren Addy Internet Specialist and Interim Web Presence Coordinator Office of Information Technology Services University of Nebraska at Kearney ___ 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 method: Trying to be too clever?
>Is it possible to pass a variable into anything other than the values >of a SQL method? I'm trying to pass a parameter to a method, such that >the param is used to define which field is affected by the action: The only thing is you'll have to define the param in your sql method definition. In this case this would be field, besides storytitle and value. > >insert into related (rootstory, ) in that case you just want a (you not passing it as sql query values) >values (, >) > >Possible? This doesn't work, of course... > hth Rik ___ 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] Win2000
I'm running it here on W2K Server - I don't remember having much of a problem setting it up. I do run it as a service, and it seems to work fine. Jake LeBeau >>> Robin Becker <[EMAIL PROTECTED]> 06/28/00 04:40PM >>> The boss says he couldn't install Zope on our Win2000 box. He tried 3 times. Anybody else have a problem with M$'s latest? -- Robin Becker ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] SQL method: Trying to be too clever?
Is it possible to pass a variable into anything other than the values of a SQL method? I'm trying to pass a parameter to a method, such that the param is used to define which field is affected by the action: insert into related (rootstory, ) values (, ) Possible? This doesn't work, of course... -- Andy Gates, Learning and Research Technology [EMAIL PROTECTED] - ICQ#74362415 ___ 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] PCGI Error: (102) failure during connect to ZServer
This is with Zope-2.2.0b3-src.tgz The pcgi wrapper reports ...is unable to connect to the ZServer background process via Unix socket .../var/pcgi.soc I am trying to install this on a remote host, this error came up locally too, though. I followed glndspud's howto on 3rdparty host setup. With a 2.1.6 release I was able to get zope running. However, with this setup I was not able to login through manage, the authorization did not work. So my reasoning, an upgrade should make this error vanish. Not so, until now. ;-( Christian ___ 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] Available Object List (Was Re: [Zope] GOOD)
>> they should put their "Available Object" white box, you know what I mean >> ? ->ABOVE<- the files. See, when you have 900 files in one directory, > > Aye! I second that. I know it is bad behavior to just say "me too" and send it to the list.. but... ME TOO! This is one of those things that would seem like it would take DC about 10 minutes to do and would greatly improve our (Zope Programmers) lives. What say DC? 2.2b4? J ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MYSQLUF : win32 binary for _mysql.pyd
I am trying to set up MySQL user folder [http://www.zope.org/Members/vladap/mysqlUserFolder] on my WinNT box. This product requires the compiled MySQLdb python module. I have MYSQL.pyd, but I'm unable to compile _mysql.pyd on Windows ? Does anyone have this binary ? thanks in advance, Darcy --- Ph: (734) 764 3377 Email: [EMAIL PROTECTED] URL: http://www-personal.engin.umich.edu/~darcyc/ --- ___ 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] GOOD
> Zope Team should incorporate that software into Zope too. As well as > they should put their "Available Object" white box, you know what I mean > ? ->ABOVE<- the files. See, when you have 900 files in one directory, > you need to scroll down each time.. so I suggest to put that box, you > know the box I mean ? Place it at the top of the page. Well, GOOD use of Zope is not to have 900 files in one directory, but to use acquisition and different folders for different objects or projects or sites. When I work with the Zope interface I realize that I spend more time on clicking the objects than the "Available Object" white box. What you could do is copy the HTML code to the "Available Object" white box and implement that into the menu (menu.dtml). Use some extra javascript to ensure that the focus is put in the workspace frame. A GOOD thing about Zope being Open Source is that you can tamper the interface for your needs if you want to. Me, for example, have created a list of all objects (not only the folders) below the tree in the menu frame. And I have the title of the object pop up in the status row of the browser. The purpose of that was that I sometimes forget what I named the object I created, when I am about to use it in a method of document in another folder. Even simpler would be to change the HTML source of the management interface yourself and cut'n'paste the "Available Object" white box above the list of objects. > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] queries and tiny tables and python methods... oh my!
On Fri, 30 Jun 2000, Rik Hoekstra wrote: > > The problem is hooking them all together. Passing the query to a > > PythonMethod is throwing up the following error: > > > > Error Type: TypeError > > Error Value: argument l: expected read-only character buffer, instance found > > The error means you're trying to split up a string, but the argument is > no string, but an instance (a Python Object). In many cases this is > caused by an omission of parenthesis, like so > > called_object instead of called_object() OK, that makes sense. > in which case the object is referenced instead of called and nothing is > returned (of course). I did not find the culprit in your description, > though. > I do not quite get what part you want to parse. Is it 'SB_B208'? > accessing this in python is a bit strange due to the returned value. You > get to the 'SB_B208'part in the following way: > > whateverreturnstheresult()[0][0][0], meaning (in this > case): I was trying to walk the fine line between providing too much detail and not enough. Briefly, 'SB_B208' is an example of the type of string I'm trying to parse. I do a string.split('l', '_') (where 'l' is the argument to the string-splitting Python method) and get ['SB', 'B208']. 'SB' is one of the two-letter codes that gets lookup up in the Tiny Table and 'B208' is an office number. Together, these two strings represent a person's location in our LDAP directory. I don't understand where the weird tuple in the traceback is coming from. > > Here's the code for parseLocation ('l' is the argument): > > > > x = string.split(l, '_') > > return x[0] > > I may be reading badly, but can you explain what the l is (or is > supposed to be)? Is it the tuple in the traceback? 'l' is passed to the Pyton Method. Examples would be: FH_123, SB_A231, DO_111, etc. > > (BTW, changing it to x = string.split(`l`, '_') eliminates the error, but > > nothing is rendered. > > > > qry_person is an ZLDAP filter method that takes one argument (uid). The > > original dtml to display this mess looks like: > > > > > > > > > > # 'building' comes from the Tiny Table > > > > Anyone see where the problem lies? -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ [EMAIL PROTECTED] || http://linux.com/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] GOOD
On Fri, 30 Jun 2000, Jonathan Desp wrote: > they should put their "Available Object" white box, you know what I mean > ? ->ABOVE<- the files. See, when you have 900 files in one directory, Aye! I second that. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] How do you use acquisition when instantiating an object via a REQUEST.set
I am a relatively new Zope user and I have a simple python Class in a python product such as: class Item(Acquisition.Implicit): # Just a simple item class def __init__(self, id): self.id=id If I instantiate the object in DTML with somthing like this: How can I make the object acquire the current context? I do not want the object to be added to any container other than the REQUEST. Thanks, Corey ___ 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] 2.2b3 hangs a lot
> been running 2.2.0b3 for a few days now. > config > redhat6.1 > postgres > ZPygreSql > kmnetnews > > after some time, zope just hangs. when i do top, there's no > processor usage at > all on all python processes. after a few minutes, zopes wake > up and continue > to serve. the cycle continues after some time. the hangup > is very sporadic. > If you look at the server logs when it hangs, do you see any pattern as to what was requested when this happens? I haven't been hearing of any hanging issues with the 2.2 betas, which makes me suspect that something specific to this site may be in play here. The fact that it comes back to life on its own after a while makes me think that this is either a very strange system issue or tied up with something that has a timeout (for ex. is it possible that a query is trying to run, timing out against the postgres database?) If the PygresSql DA is not fully thread-safe then I could imagine this as a possiblity. Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] GOOD
Hi, Good, I did it, I mean, I succeeded, I do know how to procceed with LoadSite, Itamar, you should say in your page to download not only wxpython, but also winsock etc.. in the wxpython page, they are saying it, but I didnot see it, 2 other programs, we need to download for see LoadSite working. Ok ? thanks guys ! for your support.. Zope Team should incorporate that software into Zope too. As well as they should put their "Available Object" white box, you know what I mean ? ->ABOVE<- the files. See, when you have 900 files in one directory, you need to scroll down each time.. so I suggest to put that box, you know the box I mean ? Place it at the top of the page. ___ 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] urlquote?
On Fri, 30 Jun 2000, Magnus Heino (Rivermen) wrote: > Am I doing anything wrong? :-P Are you using this within Zope? Then you could do: If I'm not mistaken, Zope also has sql_quote and html_quote. ___ 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] Messing with the namespaces stack [Was: (no subject)]
Jim Hebert wrote: > OK, I am just going to go ahead and spill the rest of what swirled around > in my head about zope when I threw up this vistasource.com site, in the > hopes that I'll either get another ego stroke (*grin*) or some more > insights as to the reason why things are done the way they are (ie, not > the way I do 'em!). This is probably going to be long, please forgive me > for going from newly subscribed to thinks-he-can-write-a-howto overnight! > =) Ha ha! I like your enthusiasm, Jim. > I am bucking a trend, I am starting to realize. Big time! The assumption > seems to be that any given page will build itself, it will suck in > standard_html_header and standard_html_footer, and compose itself of > whatever else in between those things. DTML Document is the base unit of a > page. > > Partially because I was planning at the time to build an over-simplified > front end for our system, I wanted people to be able to upload simple, > stupid chunks of "content" html and not have to do things like put > at the top and ..._footer at the bottom. > Any lame wysiwyg editor that had save-to-ftp could then push up a 'body > file' into the right folder, and I could get writers writing without > learning zope. It's a great idea but I've had some thoughts on this myself. I think the approach I would take is to create a ZClass. Content authors would create instances of this ZClass and would not have to use standard-html-header nor any other DTML if they don't want to. The ZClass would perform a simple transformation of the content before presenting it on the Web, such as adding standard_html_header/footer and including the title and date. > I also started to really groove on the idea of Object Oriented precepts > for my pages, and having to explicitly "#include" peices like the common > stuff offended those sensibilities. I wanted "objects" that had both > "data" and "code" as its members, in a nice little bundle. > > So, I made the decision that my atomic unit of what constitutes a "page" > on my server is a Folder object. This lets me collect everything > specific to a page, images that are only used there, methods that are > only used there, etc, in a tidy little bundle. So here's my scheme: > > I think of /index_html, a DTML Method, as if it were a member function of > an object. It might as well be named "render_this_folder_as_a_page." So, > it looks like (oversimplifying:) > > > > > > > > > > > > > > So, now, in each folder I just put a dtml method called body. When you > visit /about, index_html gets acquired, but since it's a dtml method, the > /about folder remains the first place to look for other stuff, so body > gets located in /about. If I want to override the menu code, I also stick > another object in there called menu, but by default my toplevel menu code > works for all the subfolders. In some perverse sense, sub-pages > conceptually are sub-classes of higher up pages, which inherit some things > (index_html for instance) things and override things (/body, nearly > always, and sometimes other things). I think you'll have more flexibility if you make ZClasses a major part of your solution. When the time comes, you'll be able to make fundamental changes more easily. Have you learned about property sheets yet? They are the key to success with ZClasses. > If I repeitively built $header + $menu + some content + footer over and > over again in page after page, I couldn't radically redesign my site (for > instance, pulling in body and sticking an advertisement between every 3rd > paragraph) without touching every page. But in the model that I use, the > one true index_html method is free to suck body in, do crazy > post-processing to it, and then send that out. > > And, of course, index_html itself can be overridden for sub-trees of the > site, if need be. > > And, I can also come up with different renderers, I suppose. Untested > might be the idea that I could put /alt_renderer as a DTML Method at the > top level, then visit /about/alt_renderer and invoke that method in the > /about context. So by separating content from presentation, I can plug my > content into lots of things simultaneously. Presumably. Also remember you can play tricks with acquisition. If you have a "default" style and a "lowres" style, you can set up your directories like this: /home /lowres /content "lowres" and "content" are both children of "home". The default style elements are in home. When the user browses to /home/content/index_html, they get the default style. When the user visits /home/lowres/content/index_html, they get the lowres style. > The only thing that has bummed me out about this strategy is that I feel > like that every time I use a 3rd party product I end up working up hill: > it usually expects to be able to write out a DTML Method or Document that > says > > > app-specific-logic-here > > > and have gotten it all. Adding a "Search Interface" is a typical example >
Re: [Zope] Error handling and super users....
Hi Andy Andy wrote: > > Hi, > > A couple of questions...: > > a) is there a way of sending an error to a default object other than > standard_error_message? For example I would like errors of type x to be > handled by one object and y by another. Obviously most objects should have > their own error handling that makes sense, but a there are few special cases > when I can see it being useful. My be is what you want? > The most obvious method is to put a big dtml if inside the > standard_error_message and send the errors to those objects. But does anyone > know of a more elegant solution (if not I can see a potential product in > there)... > > b) anyone know a way of restricting the super_user to a domain? Zope allows > you to restrict users, but I would like to tighten down Zope a little more > by only allowing super_users from within our domain... Look for the options of zpasswd.py. You can run it interactively with "python zpasswd access" at the last step you are asked for valid domains. HTH Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Kid clicking and Zope thread deadlock
> "Kid clicking" is a technical term used in multimedia game programs, > referring to firing multiple click events quickly. The most > scary part is > that under intense clicking, a multi-threaded program would go into > dead-lock. > > I have a Zope application running. When I kid-click on one button, it > actually locks Zope up. This error does not happen when I run Zope in > single-thread mode. So, for the bug seems to come from Zope thread > dead-locking. > > > > My Zope is 2.1.6. More info: it happens both with Netscape > and IE. More > info: when kid clicking on the webpage, actual requests are > sent to the Zope > server, I see from the terminal 4 lines about > > 2000-06-30T00:29:43 PROBLEM(100) ZSybaseDA Changed database > context to > 'master'. > Changed database context to 'mydatabase'. > > and it then goes into deadlock. Not sure whether it's Sybase or Zope > problem. The quick way to determine this: install a fresh Zope without SybaseDA installed and see if you can reproduce the kid-clicking behavior. Another thing potentially to look at: there is problem with Sybase connections that I have run into before where if you have a request that runs a transactional query, then a non- transactional query, then trys another transactional query you get a hang :( I don't know if this could be the case here, but if so you might want to look here for more info: http://classic.zope.org:8080/Collector/1059/view Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog Search Q
Leonard Chan wrote: > > This is supposedly a 'bad' thing to do but there's nothing better right now... > > Why is this a 'bad' thing? 'Cause it requires loading the whole object? Nope, 'cos it doesn't work with anything that plays with traversal, like SiteAccess. Something better should be coming along in Zope 2.2 but it probably won't be documented until Zope 3 :( > Yes. Our situation is like this. We have a bunch of objects (ZClass) in > various folders, and we would like to provide a dynamic search facility > for the users (in addition to traversing folders and sub-folders, which > is not a problem). > > The object has a description field, which is a few lines of text (there > is a long description field, which varies from zero length to up to 10 > times the size of the desc). > > We need to display the description field (but not the long desc) on the > search results, so to implement this, we can either stick the desc in > the catalog meta-table, or use getobject as you suggested to retrieve > the object (and hence the required attributes). > > Initially, I'm a bit worried about sticking the desc in the meta-table > 'cause it's relatively big compared to the other attributes. Maybe it's > still cheaper than getting the object (which includes the much bigger > long desc field) every time? Seen similar situation before? Any help > is appreciated. Well, given that it's going to be easier and cleaner for you to put it in the metadata table I'd d othat. I can really see any problems with this. I'm sure someone else on the list will comment if they know better... cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Question (was on zope-ptk)
Jonathan Desp wrote: > > > > Anyone know another way to upload 900 files in one shot ? > > > > What kind of files are they? What do you want to do with them once > > they're in Zope? > > they are all in .html, I want to publish it inside www.atomasoft.com, as > a website. You should be able to simply FTP these files into Zope. Have you tried this? -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.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 )
[Zope] Re: Messing with the namespaces stack
Jim Hebert wrote: > But I wanted to be able to just write while > working on > pages, so I wrap the content with > > > ... > > Jim, that is indeed clever. Am I right, however, in thinking that every DTML method or DTML document that wants this additional-parent behaviour will need to use these wrappers? I think what I'm after is the ability to alter the parents of the containing folder itself, so that any contained method automatically has this modified acquisition path. Hamish Lawson Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie ___ 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] SV: [Zope] urlquote?
> in module 'urllib' > > quote (string[, safe]) > Replace special characters in string using the "%xx" escape. Doesn't work like that here. >>> import urllib >>> urllib.quote('lösning') 'l\366sning' Am I doing anything wrong? :-P /Magnus ___ 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] urlquote?
>Hi. > >Is there a method available somewhere in python to urlquote(?) a string. > >Example: lösning -> l%f6sning > >/Magnus in module 'urllib' quote (string[, safe]) Replace special characters in string using the "%xx" escape. Letters, digits, and the characters "_,.-" are never quoted. The optional safe parameter specifies additional characters that should not be quoted -- its default value is '/'. quote_plus (string[, safe]) Like quote(), but also replaces spaces by plus signs, as required for quoting HTML form values. Plus signs in the original string are escaped unless they are included in safe. PM ___ 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] FOR loops?
Hi Andy, Zope, and python for that matter, have no for loops ;-) Try this (untested, someone please correct errors ;-): I'm assuming stringthing (eg "Root") and numberthing (eg 0) are attributed of the objects in your sequence list. cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Alternative Rendering (was Re: [Zope] Messing with the namespaces stack)
Jim Hebert wrote: > Uh oh, careful, I'm encouragable and you'll really have a monster on your > hands. ;-) I like the way you think, lots of good will come of it.. ;-) > I am bucking a trend, I am starting to realize. Big time! The assumption > seems to be that any given page will build itself, it will suck in > standard_html_header and standard_html_footer, and compose itself of > whatever else in between those things. DTML Document is the base unit of a > page. I think it's a trend worth bucking, as you point out, this trend can be out of line with the whole acquisition - inheritence objecty thing that Zope does so well... > front end for our system, I wanted people to be able to upload simple, > stupid chunks of "content" html and not have to do things like put > at the top and ..._footer at the bottom. > Any lame wysiwyg editor that had save-to-ftp could then push up a 'body > file' into the right folder, and I could get writers writing without > learning zope. Totally agree with this :-))) [snip excellent possible solution] > And, I can also come up with different renderers, I suppose. Untested > might be the idea that I could put /alt_renderer as a DTML Method at the > top level, then visit /about/alt_renderer and invoke that method in the > /about context. So by separating content from presentation, I can plug my > content into lots of things simultaneously. Presumably. This would be really useful for things like WAP and AvantGo... [snip sucky products] Well, you either have to re-develop the products or live with them :/ > I don't honestly expect that what I invented in the middle of the night 7 > days before the VistaSource launch to revolutionize how everyone builds > pages With any luck, you may be surprised ;-) > perhaps someone will have suggestions on how I can make my style "play > nicer" with all these products, too. I have a slightly different take on the problem from back when I used to use mason. Autohandlers solve parts of this... An autohandler is a bit of code which would get executed during URL traversal. it's main use is to render a wrapper around a page, for example: ...do stuff... process and render the rest of the URL (called mc_auto_next in Mason) ...do mroe stuff... So your standard_ stuff apears in the autohandler and is _automatically_ wrapped around the eventual object. How far would this go to doing what you were talking about? Not far enough might be the answer... I'm really interested in the stuff you talked about so please email more of it to me directly if you don't think it's list-related enough hope to hear from you soon, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FOR loops?
Andy Gates wrote: > > > > > > > > > > > > So where does Zope hide its FOR loop? Can't find the bugger anywhere! You already did. is FOR. As in Python's "for v in list". Use Phill ___ 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] urlquote?
Hi. Is there a method available somewhere in python to urlquote(?) a string. Example: lösning -> l%f6sning /Magnus ___ 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] FOR loops?
> > > > > > > > > > instead of `for' use : ... PM ___ 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] FOR loops?
+[ Andy Gates ]- | This ought to be easy: ... | Presenting these in a SELECT input I want to show the indentation so | it's easy to see and use. Obvious answer is to use characters | to pad the values thus: You have to drop to the python level I'm afraid... | | | | | | | | | | | | So where does Zope hide its FOR loop? Can't find the bugger anywhere! You can find these things... you just have to know what you're looking for... -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog Search Q
Leonard Chan wrote: > I'd like to include some attributes from the actual objects > (maybe by accessing the actual object via id, etc?) in the > result list. You can get the actual object with: Catalog.getobject(data_record_id_) inside your dtml-in loop. This is supposedly a 'bad' thing to do but there's nothing better right now... > I can of course include those attributes in the catalogue meta table so they would >be returned with the search results, but I don't really > want to do that unless there is no other way. Well, it might be the best way. Why? ...because otherwise you have to load up the whole object to get the attributes you want. If there's only a few attributes like this, which are small anyway, and your objects are large, then your wastign a load of RAM you don't need to be. HTH, cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] FOR loops?
This ought to be easy: through a list of entries. Each entry has a string and a number which indicates its level of indentation, so "Root",0; "Main",1; "Sub",2 and so on. Presenting these in a SELECT input I want to show the indentation so it's easy to see and use. Obvious answer is to use characters to pad the values thus: So where does Zope hide its FOR loop? Can't find the bugger anywhere! -- Andy Gates, Learning and Research Technology [EMAIL PROTECTED] - ICQ#74362415 ___ 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] queries and tiny tables and python methods... oh my!
Timothy Wilson wrote: > > Hi everyone, > > (Please excuse the vague Wizard of Oz reference in the sub., but my brain > may be imploding. :-) > > I'm trying to merge several type of Zope objects, and I'm getting lots of > little errors. I wonder if someone could suggest where my problem lies. > > 1. I'm querying our LDAP server to retrieve the records for a given person > in the directory. No problem there. > > 2. I'm parsing one of the entries in the LDAP directory to retrieve the > user's location. Python method code is simple. > > 3. I'm using a Tiny Table to look up a value for one of the parsed strings. > Easy. > > The problem is hooking them all together. Passing the query to a > PythonMethod is throwing up the following error: > > Error Type: TypeError > Error Value: argument l: expected read-only character buffer, instance found The error means you're trying to split up a string, but the argument is no string, but an instance (a Python Object). In many cases this is caused by an omission of parenthesis, like so called_object instead of called_object() in which case the object is referenced instead of called and nothing is returned (of course). I did not find the culprit in your description, though. > > (Object: parseLocation) > (Info: ((['SB_B208'],), {}, None)) > File , line 2, in parseLocation > TypeError: (see above) > I do not quite get what part you want to parse. Is it 'SB_B208'? accessing this in python is a bit strange due to the returned value. You get to the 'SB_B208'part in the following way: whateverreturnstheresult()[0][0][0], meaning (in this case): the first element (of the list) of the first element (of the first tuple) of the returned tuple > > parseLocation is a Python Method which takes 1 argument (a string) and > returns the first element of the list that's formed by splitting the string. > That first element is a two-letter code that's looked up in a Tiny Table > called buildingCodes which returns the full name of the building. > > OK, it looks to my relatively inexperienced eyes that the Python Method > isn't getting an argument of the type is expects. yep, see above > > Here's the code for parseLocation ('l' is the argument): > > x = string.split(l, '_') > return x[0] I may be reading badly, but can you explain what the l is (or is supposed to be)? Is it the tuple in the traceback? > > (BTW, changing it to x = string.split(`l`, '_') eliminates the error, but > nothing is rendered. > > qry_person is an ZLDAP filter method that takes one argument (uid). The > original dtml to display this mess looks like: > > > > > # 'building' comes from the Tiny Table > > > > I'd appreciate it if anyone has any ideas about this. I'm probably making > the whole thing too complicated, but for reasons of code reuse, this seemed > like the most efficient approach. hth Rik ___ 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] LocalFS cache, was Re: ZODB or not ZODB?
On Thu, 29 Jun 2000 10:44:39 -0700, "Jonothan Farr" <[EMAIL PROTECTED]> wrote: >> How do you do to cache those objects, since LocalFS >> referenced objects are not cached by Zope? > >They aren't cached. I experimented with adding a cache, but ran into some >problems and gave up. It would probably be worth giving it another shot, though. LocalFS happily uses the If-Modified-Since header, so an http cache (I use Squid, http://www.squid-cache.org/) can cache LocalFS content outside of Zope. This assumes you are using LocalFS to serve whole files over http, rather than processing those files inside Zope. Toby Dickenson [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZClass in ZClass problem
Hello! I started to learn ZClasses. I created a product, added a Zclass in it, and added a Zcalss inside outer ZClass - I want to create ZClass that's addable only inside outer ZClass. Then the problems begin. All management URLs for inner ZClass contain %20, so URLs look like "propertysheets/methods/RandomZItem%20/manage_workspace" and "propertysheets/methods/RandomZItem_add%20/manage_workspace". If I click on the link I got the AttributeError (of course). When I manually remove the offending %20, I can manage the object, but it's tiresome to remove it every time. The problem manifested on both 2.1.4 and 2.2.0b3. What's wrong? Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ 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 upload 900 files, in one shot ?
Jonathan Desp wrote: > > Hi, anyone here can help me with that problem below ? -v > > > How I can upload 900 files inside Zope, if I want to be able to manage > > them by the Zope Interface, I cannot browse inside data.fs, and I cannot > > upload my 900 files by FTP ing them. Because the server cannot use the > > 8021 port. I cannot upload them with Itamar program -> LoadSite, because > > it's not working, windows close the program. Um, perhaps a stupid question, but can it use other ports for ftp and/or can you reach the server? If so, you can easily change the ftp port in the z2.py program in your zoperoot (it's heavily annotated, so that shouldn't be a problem). As to loadsite, is there an error message (or a traceback) with which it closes loadsite? If the window closes too fast you may need to run it from a dos window. WIth \bin\python \loadsite.py (arguments) hth Rik ___ 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] ZCatalog Search Q
Hi, I'm trying to search a catalog and return a list of hits, and here is a code fragment: "> This works ok, however, I understand that the catalog search does not actually return object references to the actual objects catalogued. I'd like to include some attributes from the actual objects (maybe by accessing the actual object via id, etc?) in the result list. Can someone let me know how to do that? I can of course include those attributes in the catalogue meta table so they would be returned with the search results, but I don't really want to do that unless there is no other way. Thanks for any info/help. Rgds Len ___ 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] Backing Up Zope (was: Re: [Zope] Data.fs.lock?)
On Thu, 29 Jun 2000 17:19:32 -0400, Shane Hathaway <[EMAIL PROTECTED]> wrote: >Quite simply, Data.fs is appended, not modified, except during a pack >operation. Think of it like a binary log file. Therefore there are >only two ways a simple, live backup of Data.fs can fail: > >1) You do the copy in the middle of a pack operation. For most, >packing is a rare operation. But if this happened, your backup would >be worthless. I think its better than that. FileStorage packs itself into a temporary file, which is renamed to data.fs only when the pack is complete. >2) You get a partly truncated record at the very end. This is actually >not a big deal, and AFAIK in most cases ZODB is capable of >automatically rolling back a partially committed transaction. I think the other exception is during an Undo, where Zope will rewrite one byte in the middle of the file. Toby Dickenson [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Question (was on zope-ptk)
Hi Jonathan, I arbitrarily deem this to be a [EMAIL PROTECTED] rather than a [EMAIL PROTECTED] question, so I'll move it there :-) Jonathan Desp, who wants to upload a lot of files into Zope, wrote: > > someone said me to use load site, but there is a bug with this program. What is the bug in loadsite that is stopping you from using it? You have a couple of options here we haven't explored yet: 1: Fix the bug in loadsite yourself. 2: Describe the bug in sufficient detail that someone else feels moved to spend time fixing it. > Anyone know another way to upload 900 files in one shot ? What kind of files are they? What do you want to do with them once they're in Zope? Is uploading these files a recurring need you have, or is it a one-off? -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.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 )
[Zope] Error handling and super users....
Hi, A couple of questions...: a) is there a way of sending an error to a default object other than standard_error_message? For example I would like errors of type x to be handled by one object and y by another. Obviously most objects should have their own error handling that makes sense, but a there are few special cases when I can see it being useful. The most obvious method is to put a big dtml if inside the standard_error_message and send the errors to those objects. But does anyone know of a more elegant solution (if not I can see a potential product in there)... b) anyone know a way of restricting the super_user to a domain? Zope allows you to restrict users, but I would like to tighten down Zope a little more by only allowing super_users from within our domain... Thanks in advance. Andy McKay ___ 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] How to upload 900 files, in one shot ?
Hi, anyone here can help me with that problem below ? -v > How I can upload 900 files inside Zope, if I want to be able to manage > them by the Zope Interface, I cannot browse inside data.fs, and I cannot > upload my 900 files by FTP ing them. Because the server cannot use the > 8021 port. I cannot upload them with Itamar program -> LoadSite, because > it's not working, windows close the program. > > So do you know a way ? If not, it will take me 8 hours to upload all > those files, inside the data.fs, one by one. It's a nice problems, I > tryed to find a way since 3 days, now I ask the experts. It would be > good for Zope, in the next version, to add a program, where we can > upload many file in one shot/click. > > -- > Very truly yours, > > <><><><><><><><><><><><><><> > Jonathan Desp > Atoma > Matter will become Software > http://www.atoma.f2s.com > <><><><><><><><><><><><><><> -- Very truly yours, <><><><><><><><><><><><><><> Jonathan Desp Atoma Matter will become Software http://www.atoma.f2s.com <><><><><><><><><><><><><><> ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )