[Zope-dev] ZPatterns Project Help!
Another question... I want to have a GAP that will add some other Object to an attribute of my DataSkin. This is what I have tried with no success. fromexpr: accounts.getItem(self.account_id) attrsexprs: account_object=RESULT This way in my UI Methods in my DataSkin I can access (and change) the attributes of "account_object". Q. How can I do this? Should I be doing this in a different/better way? Thanks, -Ben ___ 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] Last Call: Comments on Official Docs Process
On Tue, Nov 21, 2000 at 03:13:57PM -0800, Amos Latteier wrote: > We're getting close to finalizing the procedures for the development and > maintenance of official Zope documentation. Have your say now, before we > come to closure: > > http://dev.zope.org/Wikis/DevSite/Projects/DocumentationProcess > > The plan is to fine tune a little more and then weave the documentation > processes into the fishbowl process. As I told Michel, I think the text itself sounds good, but it needs to be tested before it turns official. I'd say, when one piece of official documentation (not counting TheZopeBook) and two pieces of non-officially-written documentation are written with the process, or vice-versa, it's ready to stage II (a second round of comments and then integration). []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ 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] Last Call: Comments on Official Docs Process
We're getting close to finalizing the procedures for the development and maintenance of official Zope documentation. Have your say now, before we come to closure: http://dev.zope.org/Wikis/DevSite/Projects/DocumentationProcess The plan is to fine tune a little more and then weave the documentation processes into the fishbowl process. Thanks for your input! -Amos -- Amos Latteier mailto:[EMAIL PROTECTED] Digital Creations http://www.digicool.com ___ 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] What can you do with FSDump?
"jimbo" <[EMAIL PROTECTED]> wrote: > I installed FSDump and created a file system dump. Then do I > follow the normal rules of Python product development? What > are some of the various ways I can use it? At the moment, FSDump is a "one way" tool -- it dumps through- the-web objects to filesystem analogues. Its main use for the moment is to allow various file-based tools (CVS, diff, grep, etc.) to operate on the content. See the diff I created this morning for the DemoPortal product from the PTK: http://www.zope.org/Products/PTK/DemoProduct_0.9.0_0.9.2.diff/index_html Later, I plan to work on the "recreate from dumped files" bit, but I want to do more work on the dumping first. For the moment, the only "two way" scheme I can think of involves grabbing the "*.dtml" and "*.py" files from the output and using them as the raw materials for a replacement filesystem-based product. Tres. -- === Tres Seaver[EMAIL PROTECTED] Digital Creations "Zope Dealers" 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] Callable baseclass for ZClasses
Sorry, a DTML Method throws 'KeyError' not 'Unauthorized' But I have already seen posts on why *that* is the case (Hotfix IIRC) Stefan ___ 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] ZPatterns and ZCLasses
At 11:08 AM 11/21/00 +0100, Joachim Schmitz wrote: >I have an existing ZClass/Data Structure like this > >RecruitingPlatform > Company >Recruiting > Candidates > > Student >Profiles > Address > Highschool > IT > Jobprefs > ... > >I want to store the data in the ZClass instances, must each ZClass have the >Base class _ZClass_for_DataSkin and do I need a Rack for each class ? If you are storing dataskins in a regular folder hierarchy (or other persistent hierarchy), you don't need racks. You just need a Folder w/Customization support in the objects' acquisition hierarchy. Of course, if you don't need DataSkin-ish behavior (i.e. triggers and attribute providers), you don't need the FwCS either. DataSkins stored outside of Racks will "pretend" to be ordinary persistent Zope objects if they can't find an appropriate Customizer. That is, they act like regular Zope objects, only it takes them more work because they're pretending. :) ___ 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] Callable baseclass for ZClasses
Taking ideas from the Renderable product, the ZCallable baseclass (PTK) and the __call__ thread on this very list, I created a Callable baseclass intended as a mixin for ZClasses. class Callable: def render( self, client=None, REQUEST={}, RESPONSE=None, **kw ): '''Calls index_html, if it exists, to render this object. ''' self.isDocTemp = 1 # pass me the namespace, please local = getattr( self, 'aq_base', self ) if hasattr( local, 'index_html' ): method = self.index_html args = (self, REQUEST, RESPONSE) # substitute self for client return apply( method, args, kw ) else: raise AttributeError, 'index_html' __call__ = render I went on to make a ZClass derived from Folder and Callable to effectively create a CallableFolder. Man, was I proud ;). This worked fine for me until I had to put some security on my CallableFolders. Removing 'View' for Anonymous keeps me from accessing a CallableFolder directly but it can still be used as a subtemplate (dtml-var x) from another DTML Document or Method. Bummer! Doing some tests I discovered that plain DTML Documents show the same behaviour (!), though DTML Methods throw 'Unauthorized' as expected. Now I am confused and herewith ask the pros to kindly have a look at what I did. *) Does my baseclass do what I expect it to at all? (or only by chance ;) *) Is there a known issue with DTML Documents used as subtemplates or is their behaviour correct? *) Do I have to take measures in my baseclass to properly access/pass security contexts? *) If yes, how would I do it? *) Or is there even prior art on such a baseclass or reasons why this just cannot possibly work? If you are interested, you can get the CallableFolder product in its current state from ftp://epy.co.at/pub/zope/ I am running Zope 2.2.2 with both Hotfixes and the __call__ fix. Thanks, Stefan -- Things work better when plugged in ___ 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] Conflict Errors
Thanks for the reply :-) Chris McDonough wrote: > > It happens when more than one thread tries to modify the same object in > storage at the same time. It's Zope's equivalent of record-locking... It's > normal. There's no corruption or anything, it's telling you that it avoided > a write that might have caused problems. Zope tries three times to retry > the write. If the object is still locked by another database connection > after three writes, it propogates the exception up to the app level. That's > the error you see. Hurm, well, it appears to happen when we're doing a lot of sequential write to a product (automated bulk data upload), but the thing that triggers it off is actually trying to read a page from the same area of the site... confusing. Although that could also be a one-off coincidence... You say no corruption or anything, but if a submit results in that error, does the submitted form data get processed or not? > Careful application coding can reduce the chance of conflict errors. Can you describe what you mean by careful application coding? > I bet it happens on a catalog write > for you. No, for once it has nothing to do with the catalog. ;-) This is a python product of ours that stores lots of data in somewhat nested, persistent dictionaries. How can this be improved so this doesn't happen? > I know your next questions are going to be "why?" and "how do I fix it?" and > "why don't you fix it?". While I'd love it if you'd fix our code for free, it's probably beyond the OSS remit ;-) Any clues about how to make our code 'less bad' would be cool... cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Search Interface, maybe a Replace Interface
I've read the Search and Replace thread on [EMAIL PROTECTED] with interest and it's stirred up a few things that interest me. 1. Is there a 'Search Interface' in Zope? I know we have the Catalog, which provides _a_ search interface, but it has some problems... Wouldn't it be great if there was a neutral Zope Search Interface which specified how you would index, un-index, re-index objects and how you would search the resulting indexes? That way, you could use ZCatalog, should you wish, but likewise someone could implement that interface usign MySQL's new full text searching stuff, or perhaps the Verity search engine, or whatever else anyone wants to implement. I guess PJE might fire in with the suggestion of a LoginManager-like implementation so people could search and index things in a mroe flexible way, which would also be a great idea... 2. I agree completely with Jon Farr about the replaceable side of things. Any object which supports 'content replacement', which is what we're talking about here, should implement the replaceable interface. Dunno what this would look like though, I guess the Replaceable interface would need to extend the Catalog interface... ...hmmm, that raises an interesting other point, one which has been mentioned before, that of nested catalogs. Okay, I'm not going to explain this very well, and I'm sure it has huge problems, but... ...what if all content objects implemented a SearchAndReplace interface, and in addition propogated SearchAndReplace requested to any objects they contain? Hmmm... Quite enough waffling from me, what do people think? cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] FSDump + 'diff -r' -> Wow!
I was just able to scratch a *really* big itch: I used my FSDump product, plus 'diff -r -u', to generate a diff between the versions of DemoPortal (the "through-the-web" portion of the PTK) shipped with PTK 0.9.0 and 0.9.2: http://www.zope.org/Products/PTK/DemoProduct_0.9.0_0.9.2.diff/index_html I am tickled pink -- this is exactly the kind of data I need to be able to hang on the the ears of the tiger which is through-the-web development! Tres. ___ 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] ZPatterns and ZCLasses
I have an existing ZClass/Data Structure like this RecruitingPlatform Company Recruiting Candidates Student Profiles Address Highschool IT Jobprefs ... I want to store the data in the ZClass instances, must each ZClass have the Base class _ZClass_for_DataSkin and do I need a Rack for each class ? Mit freundlichen Grüßen Joachim Schmitz AixtraWare, Ing. Büro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 ___ 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] How to call methods of an istance in ZODB from Python product?
* Petr Knapek <[EMAIL PROTECTED]> [001121 09:25]: > Hi Zopists, > I would like to know how to call a method of an instance in ZODB from > Python product class which is not class of that instance. something like: self.some_folder.some_sub_folder.instance.method(arg) seb ___ 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] How to call methods of an istance in ZODB from Python product?
Hi Zopists, I would like to know how to call a method of an instance in ZODB from Python product class which is not class of that instance. Thanks in advance, Petr PS If you know also some URL on the topic please give me it also. -- Petr Knápek NEXTRA Czech Republic, s.r.o., Hlinky 114, 603 00 Brno, Czech Republic e-mail: mailto:[EMAIL PROTECTED] tel:+420-5-43 554 150 FAX:+420-5-43 554 214 ___ 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 )