[Zope-dev] Using Zope-modules in Python
Hi, I want to use some Zope-modules in plain Python, no web-stuff, namely ZODB and Persistence (maybe others too ). I've installed BeOpen Python 2.0 and Zope 2.2.2. I want to import the Zope-modules, but adding the C:\Program Files\WebSite\lib\python-folder to sys.path just doesn't cut it. I get an import error. Running on Windows 2000. Any tips, hints or guides wanted. Thanks! Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] Inheritable Propertysheets!???!!?!?!?!!
AFAIK (but I'm no expert), a ZClass inherits its parents' propertysheets and you can access them in the normal way. The problem is that the all the propertysheets have to have different names. Example: If your parent class and the child class both have a property sheet called "Basic", but the child class is hoping to inherit someproperty from the parent class: ParentClass.Propertysheets.Basic.someproperty is ok, but ChildClass.Propertysheets.Basic.someproperty won't work, because "someproperty" is not in ChildClass's "Basic" propertysheet. If your parent class and child class do not share propertysheets with the same name, you *can* access parent properties: ChildClass.Propertysheets.ChildSheet.anotherproperty ChildClass.Propertysheets.Basic.someproperty will both work. If I'm correct, this is all wrong and a bad thing, surely? However that was the worst-explained thing I've ever been responsible for and it's probably wrong. That particular configuration of punctuation in the subject header just struck a chord with me... seb. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alexander Schonfeld Sent: 18 October 2000 10:25 To: [EMAIL PROTECTED] Subject: Re: [Zope-dev] Inheritable Propertysheets!???!!?!?!?!! I guess I can just use dtml methods that return lists and stuff, but is that as cool? On Wed, 18 Oct 2000 18:21:33 +0900 Alexander Schonfeld [EMAIL PROTECTED] wrote: I'm doing an experiment... If I add more '!' and '?' marks will I get a response. Soon with enough experimentation I can find the optimal number and frequency of variation. I want to inherit the properties of one zclass in another zclass, but it seems to cause some namespace clashing... shouldn't this be possible? Working with the instance of the class is fine, but inter-zclass inheritance (acquisition?) would be nice... Cool feature? Am I missing something? Thanks, Alex. 1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 [EMAIL PROTECTED] - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) 1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 [EMAIL PROTECTED] - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Using Zope-modules in Python
Thomas Weholt wrote: Hi, I want to use some Zope-modules in plain Python, no web-stuff, namely ZODB and Persistence (maybe others too ). I've installed BeOpen Python 2.0 and Zope 2.2.2. I want to import the Zope-modules, but adding the C:\Program Files\WebSite\lib\python-folder to sys.path just doesn't cut it. I get an import error. Running on Windows 2000. Any tips, hints or guides wanted. Thanks! a good place to start http://starship.python.net/~amk/zodb/index.html kapil ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] SkinScript Exceptions
Using the following Rule: WHEN eventspec STORE myattributelist USING storemyattributes() SAVING momentolist How does failure to store an attribute get signaled back to the DataSkin? Can I raise an exception in a SkinScript if a rule fails due to failure of the "WHEN eventspec"? What I really is after is a way to control the change of states. To enter one state (changing some attributes to some state) the object needs to be in a precondition state (having some attributes set to some values). The rule should fire when the state attributes are changed, check the precondition and if true, change the state (the attributes) and if not notify the caller (raise exception). Regards, Johan Carlsson ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Typo in Version.py
On 10/18/2000 9:04 AM, "Greg Ward" [EMAIL PROTECTED] wrote: Now if only I could figure out why Zope is trying to raise that exception on me... (I'm not deleting a version, I'm just renaming something within a version!) Greg Because Rename deletes. The basic sequence of a renameObject command is (in short): In short, it: 1.Gets the object off of the objectmanager using the old id. 2.Deletes it from the objectmanager (doesn't delete the object itself!). 3.Changes the id of the object. 4.Adds it back to the objectmanager with the new id. The detailed version is: 1.Check ID (is the new id invalid or already used?), raise Invalid ID if so. 2.Get the object using _getOb 3.Check if object supports copying\moving using cb_isMoveable, raise CopyError 4.Use _verifyObjectPaste (Does some verification to make sure the user. 5.Try to notify recipient of the copy (in this case "self" - the ObjectManager or other CopySupport-subclassed class instance), if that fails, raise a Rename Error. 6.Delete the object off of the object manager (self._delObject) 7.If possible, get the aq_base of the object, then set the objects id to the new id. 8.Set the modified object on the ObjectManager, leaving the ownership info unchanged. (self._setObject). Jeffrey P Shell, [EMAIL PROTECTED] http://www.digicool.com/ | http://www.zope.org ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Typo in Version.py
On 10/18/2000 9:27 AM, "Jeffrey P Shell" [EMAIL PROTECTED] wrote: On 10/18/2000 9:04 AM, "Greg Ward" [EMAIL PROTECTED] wrote: Now if only I could figure out why Zope is trying to raise that exception on me... (I'm not deleting a version, I'm just renaming something within a version!) Greg Because Rename deletes. The basic sequence of a renameObject command is (in short): Actually, I'm not sure what you're asking here: are you renaming the Version object itself? Or renaming something else while inside the version? Jeffrey P Shell, [EMAIL PROTECTED] http://www.digicool.com/ | http://www.zope.org ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] SkinScript Exceptions
At 12:27 PM 10/18/00 +0100, Johan Carlsson wrote: Using the following Rule: WHEN eventspec STORE myattributelist USING storemyattributes() SAVING momentolist How does failure to store an attribute get signaled back to the DataSkin? It does not. An exception in your rule will simply cause the Zope transaction to abort. Can I raise an exception in a SkinScript if a rule fails due to failure of the "WHEN eventspec"? No. If the eventspec is not matched, the rule will not fire, so you will not have any opportunity to raise an exception. What I really is after is a way to control the change of states. To enter one state (changing some attributes to some state) the object needs to be in a precondition state (having some attributes set to some values). The rule should fire when the state attributes are changed, check the precondition and if true, change the state (the attributes) and if not notify the caller (raise exception). Rules only fire at transaction or subtransaction commit, so you can only perform your checks at that time. You can perform whatever operations you wish, but only at that point. If you need to force rules to be checked, you must ask Zope to do a subtransaction commit, and then you will be able to catch errors like this: try: get_transaction().commit(1) #subtransaction commit except MyException: # do whatever else: # we're okay, go ahead Note, however, that if you find yourself doing this kind of thing a lot, it's a good sign that your class is missing validation that belongs in the class. If you need the validation to be parameterized or customizable, you can always determine certain class attributes using attribute providers, and thus avoid forcing the existence of complex triggers. In general, triggers are intended to be used as add-ons for data manipulation or to extend a class which otherwise would be difficult to extend. They're not for performing the normal logic of a class. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope] bobobase_modification_time and .zexp
On Tue, 17 Oct 2000 21:25:18 +0200, "Wolfgang Strobl" [EMAIL PROTECTED] wrote: Wherever I need information when the page has been created, I use my creationTime attribute. Sure. For your own creations it's somewhat easier, just create your own timestamps. But what about existing content. Say: what if you have a Yihawdirectory which has grown for a while, plus a collection of Zwikis scattered over various Zopes, which I want to move into a a single new, but already existing on a bigger, greater and better server? Zopes existing 'find' mechanism lets you apply an operation to all the objects that it matches - use that to patch your existing objects to the new schema. I do not know how to implement 'modificationTime' attribute (or better: how to change it whenever someone edits or uploads the document). Well, for a moment I considered hacking ExportImport.py, but it's not obvious. That's why I'm asking whether somebody perhaps already has solved the problem. There is the option of stripping all the various data.fs and combining them via mounting, but this is far from elegant, if it works at all. bobobase_modification_time returns the timestamp of the transaction containing the most recent copy of the object. timestamping is fundamental to ZODB. For this alone to work you will need to keep the objects in separate data.fs files forever. 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] DCOracle + LOB
hi all, i have this shiny brand new oracle 8i server and now read (on the mailinglist) that there's no lob support for oracle 8i in dcoracle 1.3.2, and indeed it does not appear to work. is that true? i need lob support! is there any workaround? through stored procedures maybe? thanks a lot! peter. -- _ peter sabaini, mailto: [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] MySQL and Zope struggles
Thanks Monty, I did try the temporary table route - problem is that Zope keeps the connection open so the temporary table stays there. Of course you can explicitly drop the temporary table after you've used it. However if the update fails for any reason the temporary table will still exist so next time in the SQL method fails because its trying to create a temporary table that is already there. I know this shouldn't happen etc but I don't like code that has that kind of potential problem in it - it isn't 'fail-safe'. I decided better to use a permanent table. The SQL method locks it, deletes everything in it then writes the data it needs to store. That way its fail safe and I would expect more efficient than creating and dropping tables. However I hadn't appreciate the REPLACE command. That's a real hidden gem. I'm off to see if I can use it - thanks. Richard At 11:37 17/10/00, you wrote: You can do it with temporary tables. Like this- create temporary table foo ( note_id int, notes varchar ); insert into foo select Note.note_id, Note.notes from Note, Artist where Note.note_id=Artist.note_id and Artist.artist_id=23; update foo set notes="asdlfna"; replace into Note select note_id, notes from foo; This does assume that the note_id is unique. You may also need to explicitly drop foo, because it goes away when you disconnect, but of course Zope holds connections open. !!! However -- now that I think of it... you can just do: replace into Note select note_id, "New Note" from Artist where artist_id=23; Of couse, this will change all notes for an artist, so it assumes the artist_id is unique as well. (Which I would assume it is from your model.) If you need more complex things, look into temporary tables, but the MySQL extension (like replace) do allow you to do fun things. Hope this helps, Monty Richard Moon wrote: Nice idea. Trouble is the note table is used to hold notes for many different reasons, so it looks like this - --- | Artist| | Recording | | Label | etc. --- | artist_id | |recording_id| |label_id| | note_id | |note_id | |note_id | --- | || | | - | -- | Note | -- | note_id | | notes| -- It looks as if there wasn't anything I was missing - I'm just going to have to break the code up into separate SQL Methods. The example I gave was quite simple compared to some of the updates I have to deal with. Thanks anyway. At 17:40 16/10/00, you wrote: Or you could renormalize your data to have: - --- | Artist | | Note | |-|---|---| | id | | id| -| artist_id | | note_str | --- you now have a list of notes by artist_id. You typically won't have a screen that doesn't have an Artist context to be adding a note to. (or to remove all notes from). Of course this means more work to migrate :-( And I don't know all possible scenarios for which you would need the structure you gave, but it is another way around this. It probably doesn't solve real complex scenarios either. JAT Dale Richard Moon [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) Richard Moon [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] Mozilla-back button
To support Mozilla I'd like to switch to M18, but in the Zope-Management-Interface the back-button doesn't seems to work. What am I missing?? -- Sent through GMX FreeMail - http://www.gmx.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] transactions howto released
Hi. There's a short howto describing the semantics of ZODB transactions at http://www.zope.org/Members/mcdonc/HowTos/transaction. Enjoy! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] UserDb - Please just WORK
Since Login Manager isn't doing the trick, I've been trying User DB to authenticate to my postgresql DB. I get some strange errors, like when I try to view a page that is 'protected' by UserDb, I get the error message below. Also, when I click a user in the management screen, it says "the specified user does not exist". Arrggg this task is so simple but REALLY FRUSTRATING... Thank you, thank you, thank you... (to anyone who can help) Error Type: TypeError Error Value: argument 1: expected read-only character buffer, None found Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 162, in publish File /usr/local/zope/lib/python/ZPublisher/BaseRequest.py, line 440, in traverse File /usr/local/zope/lib/python/Products/UserDb/UserDb.py, line 310, in validate (Object: RoleManager) File /usr/local/zope/lib/python/AccessControl/User.py, line 437, in validate (Object: RoleManager) File /usr/local/zope/lib/python/Products/UserDb/UserDb.py, line 147, in getUsers (Object: RoleManager) File /usr/local/zope/lib/python/Products/UserDb/UserDb.py, line 52, in __init__ TypeError: (see above) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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 about removing broken things like Confera and ZDiscussions?
Why are things like ZDiscussions and Confera even on the zope download pages? They don't work! It would be better if they were moved to a section called "Things that worked once but aren't being maintained so they don't work any more". Otherwise people starting out might see all these seemingly useful things and get frustrated when they dont work. Arrrggg. I just want a bulletin board that works! I know what you are going to say, so I'll start digging through the python code before you yell at me... -- 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] Mozilla-back button
[EMAIL PROTECTED] wrote: To support Mozilla I'd like to switch to M18, but in the Zope-Management-Interface the back-button doesn't seems to work. What am I missing?? mozilla not handling frames and history correctly... i think the latest nightly does it properly. kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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 about removing broken things like Confera and ZDiscussions?
Cary O'Brien wrote: Why are things like ZDiscussions and Confera even on the zope download pages? They don't work! It would be better if they were moved to a section called "Things that worked once but aren't being maintained so they don't work any more". Otherwise people starting out might see all these seemingly useful things and get frustrated when they dont work. Arrrggg. I just want a bulletin board that works! perhaps you want to check out ZUBB... kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] INSTANCE_HOME breaks cross products import
Hi, I'm using then the INSTANCE_HOME to have separate Zope instances use a base zope installation and a shared products directory with symlink's to the instance product folder. As described in the "How-To: Make your life easier with INSTANCE_HOME" by 4am. Now the LoginManager can't import anything from the ZPattern module. start up error message 2000-10-17T21:59:14 ERROR(200) Zope Couldn't import Products.LoginManager Traceback (innermost last): File /bigshare/zopeservers/Zope-2.2.2-base/lib/python/OFS/Application.py, line 397, in import_products (Object: string) File /bigshare/zopeservers/unitedrings/Products/LoginManager/__init__.py, line 1, in ? File /bigshare/zopeservers/unitedrings/Products/LoginManager/LoginManager.py, line 9, in ? ImportError: cannot import name SheetProviderContainer /start up error message Now this works fine if I start Zope from the base Zope installation. So what goes wrong and why? Does I do anything wrong or should/could this be fixed in the product? If so I guess it would be practical to document som product author guidelines. Regards, Johan Carlsson ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] UserDb - Please just WORK
ed, If I'm right it should be a fairly simple job to fix it. I use Interbase to hold my user database and out of the box I get almost exactly the same problems you do. The problem is that 'password' is a reserved word. The interbase solution is to rewrite the UserDB sql queries to be something like : select username, "PASSWORD",domains,roles from users Note the quotation marks around 'password'. Another solution involves editing UserDB.py, I can't remember the exact place, but you need to tell it to use a different name for the password field, I chose 'password_' at one time, which also fixed the problem. hth Phil [EMAIL PROTECTED] - Original Message - From: "ed colmar" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 18, 2000 2:40 PM Subject: [Zope] UserDb - Please just WORK Since Login Manager isn't doing the trick, I've been trying User DB to authenticate to my postgresql DB. I get some strange errors, like when I try to view a page that is 'protected' by UserDb, I get the error message below. Also, when I click a user in the management screen, it says "the specified user does not exist". Arrggg this task is so simple but REALLY FRUSTRATING... Thank you, thank you, thank you... (to anyone who can help) Error Type: TypeError Error Value: argument 1: expected read-only character buffer, None found Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 162, in publish File /usr/local/zope/lib/python/ZPublisher/BaseRequest.py, line 440, in traverse File /usr/local/zope/lib/python/Products/UserDb/UserDb.py, line 310, in validate (Object: RoleManager) File /usr/local/zope/lib/python/AccessControl/User.py, line 437, in validate (Object: RoleManager) File /usr/local/zope/lib/python/Products/UserDb/UserDb.py, line 147, in getUsers (Object: RoleManager) File /usr/local/zope/lib/python/Products/UserDb/UserDb.py, line 52, in __init__ TypeError: (see above) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] SQL cursor error
The first problem is your are running Microsoft. Just kidding. On Wed, 18 Oct 2000, steve smith wrote: Anyone know what this means? Error Type: sql.error Error Value: ('24000', 0, '[Microsoft][ODBC SQL Server Driver]Invalid cursor state' I get this when I try to submit a form which passes control to a dtml method. that method in turn makes a dtml-call to another, which calls a SQL method. Regards Steve Smith ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] How about removing broken things like Confera andZDiscussions?
Cary, I've written some code that requires ZSQL Methods that I've been heavily considering porting over to a Product sometime in the near future. It has been more of a "is there enough demand for a forum product" than anything really. Take a look at http://www.phunc.com/Forums and tell me if it looks any bit appealing to you. If I see enough demand, I'll productize it, otherwise, tough luck ;] Knight [EMAIL PROTECTED] On Wed, 18 Oct 2000, Cary O'Brien wrote: Why are things like ZDiscussions and Confera even on the zope download pages? They don't work! It would be better if they were moved to a section called "Things that worked once but aren't being maintained so they don't work any more". Otherwise people starting out might see all these seemingly useful things and get frustrated when they dont work. Arrrggg. I just want a bulletin board that works! I know what you are going to say, so I'll start digging through the python code before you yell at me... -- 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 ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help Debugging External Methods
On Tue, Oct 17, 2000 at 09:05:29PM -0700, Kapil Thangavelu wrote: The Debugger is your friend http://www.zope.org/Members/michel/HowTos/TheDebuggerIsYourFriend That's a useful page -- thanks for the link. It's interesting that the example fooMethod() function has a major flaw, contrary to what the HowTo says: "There's actually nothing wrong with this method to debug". I would have replied directly to the author, 'michel', but his email address does not appear on that HowTo page or any of the pages that I scanned under http://www.zope.org/Members/michel. -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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 about removing broken things like Confera andZDiscussions?
There is a ZDiscussions that works. It is called ZUBB. http://www.zope.org/Members/BwanaZulia/ZUBB But, I agree, old product that have been left behind (the old version of ZDiscussions/Confera) should be marked and or archived. J From: "Cary O'Brien" [EMAIL PROTECTED] Date: Wed, 18 Oct 2000 09:36:13 -0400 (EDT) To: [EMAIL PROTECTED] Subject: [Zope] How about removing broken things like Confera and ZDiscussions? Why are things like ZDiscussions and Confera even on the zope download pages? They don't work! It would be better if they were moved to a section called "Things that worked once but aren't being maintained so they don't work any more". Otherwise people starting out might see all these seemingly useful things and get frustrated when they dont work. Arrrggg. I just want a bulletin board that works! I know what you are going to say, so I'll start digging through the python code before you yell at me... -- 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 ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] GUF, ZODB, and 2.2.2
Has anyone had luck getting GUF to work using ZODB to store the user info, and Zope version 2.2.2 (no hot fixes)? I had some code working fine in 2.2.1, but in 2.2.2 I am having lots of trouble getting GUF to work. The current implementation I have places a folder in the acl_users (GUF) folder and that is where I've put my own ZClass (representing each user) inside that folder. In a vain attempt to get it working I have made sure that there are no aquired rights in acl_users, and that anonymous has the Can Login, and Access contents rights. I've also changed all of the hooks I have and made them proxy as root. I've had trouble in the past with GUF but I've always gotten it working. Not so here. Has anyone tried this type of setup and gotten it working? __ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.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] Want to access ZClass Instance from external program
Well, I've gotten xmlprclib and fixed it up so I can talk to my server. So far I can retrieve objectIds and retrieve objects via an objectid, but I can't figure out how to get to the property sheets. Here's what I've got: server = Server( "http://jonprettyman.com" ) print server for k,v in server.EBQ.id_company_apply_html.propertysheets.common.propertyItems(): print "%-15s: %s" % (k, v) My ZClass has a propertysheet named ``common'' The error I get is: -2 Unexpected Zope Error Value and a bunch of HTML which boils down to: Resource not found -jon Kapil Thangavelu [EMAIL PROTECTED] writes: its easiest to it with (IMO) xml-rpc and find your zclasses with calls to objectids and query the propertysheets directly for property info. check out http://www.zope.org/Members/Amos/xmlrpclib.py you'll need to fix a base class and an import. www.xml-rpc.com www.xml.com search for amos and zope.org for howtos on xmlrpc Cheers Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Problems with PoPy 1.4 ZPoPyDA 0.7
Thanks for the help Kapil. That was the problem, but what I did instead was copied the PoPymodule.so from the system python lib folder to /zope_home/lib/python. That did the trick. Dustin Kapil Thangavelu [EMAIL PROTECTED] said: hi dustin your probably not running the same python interpreters. check your start shell script and see which python interpreter its using and compare it to (i'm kinda of assuming your're on a *nix system) which python they probably aren't the same. just edit the start script accordingly. kapil [EMAIL PROTECTED] wrote: I have a working install of Zope 2.2.2. I installed the python module PoPy 1.4 and then attempted to install the ZPoPyDA 0.7 DB adapter. The ZPoPyDA README said to run a configure script but there was none. So I just moved the ZPoPyDA directory it created into the lib/python/Products directory in my zope home. Now for the strange part. When I start zope, I get the following: 2000-10-17T20:25:51 ERROR(200) Zope Couldn't import Products.ZPoPyDA Traceback (innermost last): File /zope_home/lib/python/OFS/Application.py, line 397, in import_products (Object: string) File /zope_home/lib/python/Products/ZPoPyDA/__init__.py, line 32, in ? File /zope_home/lib/python/Products/ZPoPyDA/DA.py, line 35, in ? File /zope_home/lib/python/Products/ZPoPyDA/PoPy_db.py, line 27, in ? ImportError: No module named PoPy ZPoPyDA comes up as a broken product in the Control Panel. So I checked it out on my own. I created a file with the following line: import PoPy I ran 'python test' and no errors. I added the line: import bla And then ran 'python test' again just to be sure and it did die saying no such module bla. I even typed 'import PoPy' in the python interactive shell and nothing. So outside of zope, python seems to be able to import PoPy, but when zope tries to import ZPoPyDA it claims there is no PoPy module. Any ideas? Thanks in advance, Dustin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] __len__ Errors
Nope, the list might benefit from seeing the traceback though... cheers, Chris Scott Burton wrote: They are ZDiscussion based. I might have figured out why. I added my custom properties to the discussion items. I did not know ZD was python-based and not entirely ZClassed. I have been moving my products over to 2.2 on my server with the exception of ZDiscussion which seems to be giving me a strange error when I try to import the ZDiscussion.zexp. It is an A pickle error. I could give you the trace back it has some strange errors in it regarding other product???. I will try some more this evening. Thanks, Scott From: Chris Withers [EMAIL PROTECTED] Organization: New Information Paradigms Date: Wed, 18 Oct 2000 10:16:34 +0100 To: Scott Burton [EMAIL PROTECTED] Subject: Re: [Zope] __len__ Errors Scott: No HTML mail! ;-) Are the discussions groups Squishdot-based? Any reason you can't upgrade to 2.2.2? cheers, Chris Scott Burton wrote: I seem to be getting __len__ errors: Error type: exceptions.AttributeError Error value: __len__ When accessing any method with an dtml-in loop. I am running 2.1.6, with the current hot fixes. It seems to have started after installing the hot fixes. I can replicate it with a simple dtml-in loop in a method. I read somewhere about the hotfix changing objects ownerships. Could this be causing this? If so, how do I remove a hotfix? It has rendered my discussion groups useless. TIA Scott ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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 about removing broken things like Confera andZDiscussions?
There is a ZDiscussions that works. It is called ZUBB. http://www.zope.org/Members/BwanaZulia/ZUBB But, I agree, old product that have been left behind (the old version of ZDiscussions/Confera) should be marked and or archived. J Might be better to have a more formal declaration of the dependencies on versions of products relied upon at the download pages -- for some products this has become a tricky and madning process to make sure all the versions are correct for a product to run. This is natural in the progress of Zope and Zope products and will become even more and issue as Zope matures even further. This can be formalized. I do like the way SGI does some of this. Just my cents (sense). Regards, Albert Boulanger [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] Discussions
Kapil Thangavelu wrote: Cary O'Brien wrote: Why are things like ZDiscussions and Confera even on the zope download pages? They don't work! It would be better if they were moved to a section called "Things that worked once but aren't being maintained so they don't work any more". Otherwise people starting out might see all these seemingly useful things and get frustrated when they dont work. Arrrggg. I just want a bulletin board that works! perhaps you want to check out ZUBB... Or Squishdot ;-) Who's maintaining ZUBB nowadays? 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] How about removing broken things like Confera and ZDiscussions?
There is a ZDiscussions that works. It is called ZUBB. http://www.zope.org/Members/BwanaZulia/ZUBB But, I agree, old product that have been left behind (the old version of ZDiscussions/Confera) should be marked and or archived. J Might be better to have a more formal declaration of the dependencies on versions of products relied upon at the download pages -- for some products this has become a tricky and madning process to make sure all the versions are correct for a product to run. This is natural in the progress of Zope and Zope products and will become even more and issue as Zope matures even further. This can be formalized. I do like the way SGI does some of this. Bangs head. Doh! Why the heck don't products have explicit requirements the "package require n.m" in TCL. Heck, python ought to. Import Fred(1.2) from Bedrock Or something like that. -- 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] HELP! Permissions problem, ZClass
Take a look at Security View of its ZClass. Give permissions to anonymous users. Marcus Mendes Eric Walstad wrote: Help, pls! I have a ZClass that is functioning beautifully if I am logged in, but the anonymous user keeps getting prompted for a password. The problem occurs when my DTML method trys to create a new instance of the ZClass. I tried giving that DTML method a Proxy of "Manager" but that isn't helping. Any pointers? Thanks, Eric. Here's the traceback: Zope Error Zope has encountered an error while publishing this resource. Unauthorized You are not authorized to access CNewsItem. Traceback (innermost last): File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/Zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: buildNews) File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: buildNews) File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: buildNews) File /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: buildNews) File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py, line 146, in render (Object: manage_addProduct['NewsItem']) File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval (Object: CNewsItem_add(_.None, _, NoRedir=1)) (Info: _) File string, line 0, in ? File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 168, in __call__ (Object: CNewsItem_add) File /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: CNewsItem_add) File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py, line 133, in render (Object: CNewsItem.createInObjectManager(REQUEST['id'], REQUEST)) File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py, line 331, in eval (Object: CNewsItem.createInObjectManager(REQUEST['id'], REQUEST)) (Info: CNewsItem) File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 194, in validate (Object: buildNews) File /usr/local/Zope/lib/python/AccessControl/SecurityManager.py, line 139, in validate File /usr/local/Zope/lib/python/AccessControl/ZopeSecurityPolicy.py, line 209, in validate Unauthorized: (see above) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] How about removing broken things like Confera and ZDiscussions?
How about a tested with version x field on Products? - Original Message - From: "Cary O'Brien" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, October 18, 2000 9:32 AM Subject: Re: [Zope] How about removing broken things like Confera and ZDiscussions? There is a ZDiscussions that works. It is called ZUBB. http://www.zope.org/Members/BwanaZulia/ZUBB But, I agree, old product that have been left behind (the old version of ZDiscussions/Confera) should be marked and or archived. J Might be better to have a more formal declaration of the dependencies on versions of products relied upon at the download pages -- for some products this has become a tricky and madning process to make sure all the versions are correct for a product to run. This is natural in the progress of Zope and Zope products and will become even more and issue as Zope matures even further. This can be formalized. I do like the way SGI does some of this. Bangs head. Doh! Why the heck don't products have explicit requirements the "package require n.m" in TCL. Heck, python ought to. Import Fred(1.2) from Bedrock Or something like that. -- 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 ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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 about removing broken things like Confera and ZDiscussions?
There is a ZDiscussions that works. It is called ZUBB. But it doesn't do attachments. I really need attachments. I'm trying to fix Attachments in ZDConfera, but the FileObject class doesn't seem to exist any more. Arrg. -- cary http://www.zope.org/Members/BwanaZulia/ZUBB But, I agree, old product that have been left behind (the old version of ZDiscussions/Confera) should be marked and or archived. J From: "Cary O'Brien" [EMAIL PROTECTED] Date: Wed, 18 Oct 2000 09:36:13 -0400 (EDT) To: [EMAIL PROTECTED] Subject: [Zope] How about removing broken things like Confera and ZDiscussions? Why are things like ZDiscussions and Confera even on the zope download pages? They don't work! It would be better if they were moved to a section called "Things that worked once but aren't being maintained so they don't work any more". Otherwise people starting out might see all these seemingly useful things and get frustrated when they dont work. Arrrggg. I just want a bulletin board that works! I know what you are going to say, so I'll start digging through the python code before you yell at me... -- 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 ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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 about removing broken things like Confera andZDiscussions?
So... add attachments. Not really a big deal. No one product is going to do it all out of the box. That is why it is Open Source.. you open it and provide your own source of code. :) J From: "Cary O'Brien" [EMAIL PROTECTED] Date: Wed, 18 Oct 2000 12:41:59 -0400 (EDT) To: [EMAIL PROTECTED] (J. Atwood) Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [Zope] How about removing broken things like Confera and ZDiscussions? There is a ZDiscussions that works. It is called ZUBB. But it doesn't do attachments. I really need attachments. I'm trying to fix Attachments in ZDConfera, but the FileObject class doesn't seem to exist any more. Arrg. -- cary http://www.zope.org/Members/BwanaZulia/ZUBB But, I agree, old product that have been left behind (the old version of ZDiscussions/Confera) should be marked and or archived. J From: "Cary O'Brien" [EMAIL PROTECTED] Date: Wed, 18 Oct 2000 09:36:13 -0400 (EDT) To: [EMAIL PROTECTED] Subject: [Zope] How about removing broken things like Confera and ZDiscussions? Why are things like ZDiscussions and Confera even on the zope download pages? They don't work! It would be better if they were moved to a section called "Things that worked once but aren't being maintained so they don't work any more". Otherwise people starting out might see all these seemingly useful things and get frustrated when they dont work. Arrrggg. I just want a bulletin board that works! I know what you are going to say, so I'll start digging through the python code before you yell at me... -- 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 ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Discussions
Yes, Squishdot is a very good option as well. ZUBB, it would seem, it being maintained by little ole me. Maybe I should write a little "Differences between ZUBB and Squishdot" so people can figure out where to use one or the other. J From: Chris Withers [EMAIL PROTECTED] Organization: New Information Paradigms Date: Wed, 18 Oct 2000 17:29:31 +0100 To: Kapil Thangavelu [EMAIL PROTECTED] Cc: "Cary O'Brien" [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [Zope] Discussions Kapil Thangavelu wrote: Cary O'Brien wrote: Why are things like ZDiscussions and Confera even on the zope download pages? They don't work! It would be better if they were moved to a section called "Things that worked once but aren't being maintained so they don't work any more". Otherwise people starting out might see all these seemingly useful things and get frustrated when they dont work. Arrrggg. I just want a bulletin board that works! perhaps you want to check out ZUBB... Or Squishdot ;-) Who's maintaining ZUBB nowadays? 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 maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Squish it
Cary O'Brien wrote: There is a ZDiscussions that works. It is called ZUBB. But it doesn't do attachments. I really need attachments. I'm trying to fix Attachments in ZDConfera, but the FileObject class doesn't seem to exist any more. Squishdot does attachments ;-) Chris PS: It was originally based on ZDConfera, btu has grown a bit since then ;-) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Discussions
"J. Atwood" wrote: Maybe I should write a little "Differences between ZUBB and Squishdot" so people can figure out where to use one or the other. I'd love to read it :-) 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] Want to access ZClass Instance from external program
Jon Prettyman wrote: Well, I've gotten xmlprclib and fixed it up so I can talk to my server. So far I can retrieve objectIds and retrieve objects via an objectid, but I can't figure out how to get to the property sheets. Here's what I've got: server = Server( "http://jonprettyman.com" ) print server for k,v in server.EBQ.id_company_apply_html.propertysheets.common.propertyItems(): print "%-15s: %s" % (k, v) My ZClass has a propertysheet named ``common'' The error I get is: -2 Unexpected Zope Error Value and a bunch of HTML which boils down to: Resource not found -jon hmmm... try and take it a step back and query the propertysheet container for names of propertysheets it contains. you'll need to check out the ZQR for the syntax, i think its propertyIds(). you might also want to check that your authenticating with a user that has the proper security roles to query this info. if you're still having problems tell me and i'll play with it once i get back from work. Cheers Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Discussions
No problem... I have to go look at Squishdot again though. Forgetting some of the features. J From: Chris Withers [EMAIL PROTECTED] Organization: New Information Paradigms Date: Wed, 18 Oct 2000 18:05:55 +0100 To: "J. Atwood" [EMAIL PROTECTED] Cc: Kapil Thangavelu [EMAIL PROTECTED], Cary O'Brien [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [Zope] Discussions "J. Atwood" wrote: Maybe I should write a little "Differences between ZUBB and Squishdot" so people can figure out where to use one or the other. I'd love to read it :-) 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] Want to access ZClass Instance from external program
Adding: try: for k in server.EBQ.id_company_apply_html.propertysheets.propertyIds(): print "%-15s:" % (k) except Error, v: print server print "ERROR", v Gives me output, although I'm pretty shure it's not the right thing. Output: title base Both of these are properties of server.EBQ. -jon Ender [EMAIL PROTECTED] writes: Jon Prettyman wrote: Well, I've gotten xmlprclib and fixed it up so I can talk to my server. So far I can retrieve objectIds and retrieve objects via an objectid, but I can't figure out how to get to the property sheets. Here's what I've got: server = Server( "http://jonprettyman.com" ) print server for k,v in server.EBQ.id_company_apply_html.propertysheets.common.propertyItems(): print "%-15s: %s" % (k, v) -jon hmmm... try and take it a step back and query the propertysheet container for names of propertysheets it contains. you'll need to check out the ZQR for the syntax, i think its propertyIds(). you might also want to check that your authenticating with a user that has the proper security roles to query this info. if you're still having problems tell me and i'll play with it once i get back from work. Cheers Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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 and Zope struggles
What about one sql method: select @noteid:=note_id from artist where dtml-sqltest artist_id type=int dtml-var sql_delimiter update note set notes =dtml-sqlvar notes type=string where note_id = @noteid -Original Message- From: Richard Moon [mailto:[EMAIL PROTECTED]] Sent: Monday, October 16, 2000 2:48 AM To: [EMAIL PROTECTED] Subject: [Zope] MySQL and Zope struggles I'm struggling to migrate an application from Zope/PostgreSQL to Zope MySQL (Why ? - because I've got a kind offer of free hosting if I use MySQL). MySQL offers a limited set of features and is missing, among other things, the ability to use subqueries - so for example in PostgreSQL you can say update note set notes =dtml-sqlvar notes type=string where note_id = (select note_id from artist where dtml-sqltest artist_id type=int) and in MySQL you can't. If you were working in a traditional programming environment you could overcome this by splitting the above into two parts - a select to retrieve the value of note_id from the artist table followed by an update of the note table using the returned value of note-id. For example select note-id into note-id-var from artist where artist-id = 23; update note set notes = 'asdasda' where note-id = note-id-var; The problem is that in Zope I believe you can't use a returned value within an SQL Method, so the above code would fail. The only way I can see to do the above is to have two separate SQL Methods, one for the select, returning the note-id-var and another for the update. This is very clumsy. I was wondering if anyone could tell me if there was a better way. Many thanks Richard Richard Moon [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Two questions regarding SQL
Dunno if someone replied to this, but try GUF. Let's you roll your own authentication. There is a howto out there for using GUF with an SQL server. -Original Message- From: //www.alomega.com/ [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 17, 2000 3:02 PM To: [EMAIL PROTECTED] Subject: [Zope] Two questions regarding SQL Hey 2 everyone: I have two questions. 1) I need to authenticate my Zope users against a Sybase SQL database. 2) I need to make my Zope ODBC database connection object use (i.e. connect with) the user and password of the AUTHENTICATED_USER because security is at the database level, for tables and stored procedures. How do I do that? Any pointers? LoginManager did not work for zope 2.2.2 here. Besides, the new Z ODBC connection form only lets me specify an ODBC dsn or a connection string. And as I understand, the connection string is the same for ALL zope users that use that object. Any practical solutions to the problem #2? Will I have to connect to the DB as DBA? If that's the case, I'll have to go with PHP. I'm sorry for my former HTML postings. Won't happen again. Thanks in advance. -- Universidad Federico Santa Maria - Campus Guayaquil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] ZSQL Method AUTHENTICATED_USER
Hi, I'm trying to perform a simple MySQL lookup based on the AUTHENTICATED_USER. When I test the ZSQL method from the management interface, everything works fine. However, when I try to call the method from a DTML document, [it] returns nothing. Is this a namespace issue? I'm stumped and hoping that I'm not staring right past the problem. Can anyone point out what it is I am doing wrong? Thanks, a) DTML Document : foo dtml-with people dtml-in lookup_by_username dtml-var "username" /dtml-in /dtml-with b) ZSQL Method : people.lookup_by_username select * from people where username = "dtml-var "REQUEST.AUTHENTICATED_USER.getUserName()"" ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] ZSQL Method AUTHENTICATED_USER
I'm pretty sure that all variables have to be passed in explicitly with SQLMethods. Namespaces are not passed in. Try specifying username as an argument in the ZSQLMethods edit form and pass it in like this: dtml-in expr= "lookup_by_username(username=REQUEST.AUTHENTICATED_USER.getUserName()" (Untested) -jon Aaron Straup Cope [EMAIL PROTECTED] writes: Hi, I'm trying to perform a simple MySQL lookup based on the AUTHENTICATED_USER. When I test the ZSQL method from the management interface, everything works fine. However, when I try to call the method from a DTML document, [it] returns nothing. Is this a namespace issue? I'm stumped and hoping that I'm not staring right past the problem. Can anyone point out what it is I am doing wrong? Thanks, a) DTML Document : foo dtml-with people dtml-in lookup_by_username dtml-var "username" /dtml-in /dtml-with b) ZSQL Method : people.lookup_by_username select * from people where username = "dtml-var "REQUEST.AUTHENTICATED_USER.getUserName()"" ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] ZSQL Method AUTHENTICATED_USER
sigh / Thanks. It was a syntax issue. I think I tried every single variation on passing variables to the method except that one. Sorry for the bother, folks... :-) On 18 Oct 2000, Jon Prettyman wrote: I'm pretty sure that all variables have to be passed in explicitly with SQLMethods. Namespaces are not passed in. Try specifying username as an argument in the ZSQLMethods edit form and pass it in like this: dtml-in expr= "lookup_by_username(username=REQUEST.AUTHENTICATED_USER.getUserName()" (Untested) -jon Aaron Straup Cope [EMAIL PROTECTED] writes: Hi, I'm trying to perform a simple MySQL lookup based on the AUTHENTICATED_USER. When I test the ZSQL method from the management interface, everything works fine. However, when I try to call the method from a DTML document, [it] returns nothing. Is this a namespace issue? I'm stumped and hoping that I'm not staring right past the problem. Can anyone point out what it is I am doing wrong? Thanks, a) DTML Document : foo dtml-with people dtml-in lookup_by_username dtml-var "username" /dtml-in /dtml-with b) ZSQL Method : people.lookup_by_username select * from people where username = "dtml-var "REQUEST.AUTHENTICATED_USER.getUserName()"" ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] ZSQL Method AUTHENTICATED_USER
I have an approach that works for me, but it may be a bit awkward. I have a SQL method (dbGetUserID) which takes AUTHENTICATED_USER as an argument and finds the value from the "userid" field in the database: select userid from users where shortname = dtml-sqlvar AUTHENTICATED_USER type=nb When I need to perform database ops on the user, I just call this method and use the resulting id, eg, insert into sometable (userid, otherfield) values (dtml-in dbGetUserIDdtml-sqlvar userid type=int/dtml-in, dtml-sqlvar sequence-item type=int) I have AUTHENTICATED_USER in the parameter list for this SQL method as well, though it may not need to be... Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jon Prettyman Sent: Thursday, 19 October 2000 8:18 To: [EMAIL PROTECTED] Subject: Re: [Zope] ZSQL Method AUTHENTICATED_USER I'm pretty sure that all variables have to be passed in explicitly with SQLMethods. Namespaces are not passed in. Try specifying username as an argument in the ZSQLMethods edit form and pass it in like this: dtml-in expr= "lookup_by_username(username=REQUEST.AUTHENTICATED_USER.getUserName()" (Untested) -jon Aaron Straup Cope [EMAIL PROTECTED] writes: Hi, I'm trying to perform a simple MySQL lookup based on the AUTHENTICATED_USER. When I test the ZSQL method from the management interface, everything works fine. However, when I try to call the method from a DTML document, [it] returns nothing. Is this a namespace issue? I'm stumped and hoping that I'm not staring right past the problem. Can anyone point out what it is I am doing wrong? Thanks, a) DTML Document : foo dtml-with people dtml-in lookup_by_username dtml-var "username" /dtml-in /dtml-with b) ZSQL Method : people.lookup_by_username select * from people where username = "dtml-var "REQUEST.AUTHENTICATED_USER.getUserName()"" ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] A clarity problem...
Green things, After seeing yet another problem caused by the 'shorthand' of zope (using "foo" to mean expr="foo") I was wondering just how difficult it would be to REMOVE this useful, but confusing, feature. Personally, I don't have a problem with it, any more. But it seems a sizable portion of traffic on this list is because of people who do. (True, it seems to have dropped off in recent weeks... is this because there is better doco, or have newbie numbers dropped?) Even if it were a build time option or something... just rambling... Curtis Maloney ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MacOS X Server + Python 1.5.2 + Zope 2.2.2
I currently have Zope and Python installed from the source code from the excellent instructions by JShell. But there is one little problemCPU Utilization shoots above 97% as soon as I access the management screen. If anybody has any ideas or solutions. Rhapsody AWS 5.6 Kernel Release 5.6: Tue Nov 23 15:07:38 PST 1999; root(rcbuilder):Objects/kernel-187.obj~2/RELEASE_PPC Copyright (c) 1988-1995,1997-1999 Apple Computer, Inc. All Rights Reserved. Power Macintosh 320Mb..G4 Thanks Jeff Jeffy.spamtrap.@.spamtrap2.myrealbox.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] Want to access ZClass Instance from external program
Sorry Jon, i've lead you down a slippery slope... unlike ttw dtml-methods and the rest of zope which relies on the security context soley, for a filesys python method to be exposed through the web via xml-rpc it must have a doc string as well as have proper credentials. looking through propertysheets there is no 'proper' way to do this... but i lead you down the path, so here is a way back out... there are a couple of options. the easiest is to have dtml_method for this zclass that functions as a helper method, like dtml method -- external_helper dtml-var "propertysheets.propertyMap()" and in the client x = root.subfolder.zclass.external_helper() meta_info=eval(x) print meta_info ({'id': 'vvv', 'type': 'int', 'meta': {}, 'mode': 'w'}, {'id': 'aaa', 'type': 'lines', 'meta': {}, 'mode': 'w'}, {'id': '', 'type': 'tokens', 'meta': {}, 'mode': 'w'}, {'id': '122', 'type': 'date', 'meta': {}, 'mode': 'w'}, {'id': 'ff', 'type': 'float', 'meta': {}, 'mode': 'w'}, {'id': '', 'type': 'text', 'meta': {}, 'mode': 'w'}) or if external_helper returned propertyItems() [('vvv', 1), ('aaa', ['']), ('', ['ss', 'aa1113', '3', '4']), ('122', DateTime('1900/01/01')), ('ff', 455.0), ('', '')] if you're working with DateTime values in your propertysheets this will be trickier as you'll need to either retrieve the property you want independently or import Zope's DateTime module. also remember to set the security on the helper method so its not helping somebody hack your site. the rest of the ways are exercises in wasting time... IMO hope that helps out Cheers Kapil Jon Prettyman wrote: Adding: try: for k in server.EBQ.id_company_apply_html.propertysheets.propertyIds(): print "%-15s:" % (k) except Error, v: print server print "ERROR", v Gives me output, although I'm pretty shure it's not the right thing. Output: title base Both of these are properties of server.EBQ. -jon Ender [EMAIL PROTECTED] writes: Jon Prettyman wrote: Well, I've gotten xmlprclib and fixed it up so I can talk to my server. So far I can retrieve objectIds and retrieve objects via an objectid, but I can't figure out how to get to the property sheets. Here's what I've got: server = Server( "http://jonprettyman.com" ) print server for k,v in server.EBQ.id_company_apply_html.propertysheets.common.propertyItems(): print "%-15s: %s" % (k, v) -jon hmmm... try and take it a step back and query the propertysheet container for names of propertysheets it contains. you'll need to check out the ZQR for the syntax, i think its propertyIds(). you might also want to check that your authenticating with a user that has the proper security roles to query this info. if you're still having problems tell me and i'll play with it once i get back from work. Cheers Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] OT: documentation systems.
Hi, What documentation systems to people use for developing offline hardcopy and online user documentation for applications that they develop? I am writing an extensive application using zope, and it needs a lot of user documentation. The system I use won't necessarily have to be web based...I just wants something that is effect. terry -- Terry Kerr ([EMAIL PROTECTED]) Adroit Internet Solutions Pty Ltd (www.adroit.net) Phone: +613 9563 4461 Fax: +613 9563 3856 Mobile: +61 414 708 124 ICQ: 79303381 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )