Re: [Zope-dev] DTML block parsing
Casey Duncan wrote: > > OK, I have developed a new patch that almost completely fixes this > issue. In fact I am happier with it in general than my first patch. > There is only one flaw, although you can nest comments inside of one > another, and you can have any manner of broken dtml inside, if you open > another comment tag inside it, it must be properly balanced or you will > get a parse error. Here are some examples: > I am a bit concerned that should ever generate errors at > all, but this is certainly an improvement. Anybody have any thoughts? I'm very happy with the way you describe the patched tag works. I'll try it out when I return from the EuroZope meeting in Amsterdam. I don't think it is reasonable to try to catch unbalanced dtml-comment tags. In fact, I like the fact that it will raise an error if I leave them unbalanced. Thanks. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ 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] Old to new registerClass
Im hacking around IEMethod and it uses an old style of class initialisation in the __init__.py along the lines of: misc_ = { 'imagef':'foo','imageg':'goo', } lang_= { 'en':'lang_en','sv':'lang_sv', } I want to put this into a modern style product initialisation (context.registerClass). Looking at this functions API it didn't become readily apparent how I can pass in these values. This would be nice to do so I don't have any hacking of dtml to do. Has anyone done this / got any advice? Thanks. -- Andy McKay. ___ 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] dtml-in batching
On 24 Jan 2001, at 11:15, [EMAIL PROTECTED] wrote: > Brad Clements wrote: > > I posted this same bug AND a patch as bug # 1566 on Aug 28th, 2000. > > > > http://classic.zope.org:8080/Collector/1566/view > > > > Sad to see its *still* pending > > Well that's odd - I searched the collector for "dtml-in" and got no > matches. A search for "renderwb" (which is in the title) works. Looks like > it doesn't search the description after all. Boo to the search engine. > > Just curious: why specify the browser/platform/python version stuff when > the problem is independant of those things? > Because I'm Anal Retentive. Also figured perhaps my entry would be ignored without that information. Or worse the form would be rejected on submit because those fields where blank AND it wouldn't remember what I'd put in AND back would fail. So, I filled out the form entirely. Brad Clements,[EMAIL PROTECTED] (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements ___ 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] CSS file serving
Dieter Maurer wrote: > > [EMAIL PROTECTED] writes: > > That (or rather Image.File) was where I started. I decided to go with > > HTMLFile as a basis so we could have some DTML in the CSS file - but > > overrode it so we weren't forced to have the .dtml extension (much happier > > web designers that way :) > > Thus, the only thing, you need to do in addition, is to set > the correct content type. Which is pretty much what I did. I've attached the CSSFile class (which I suppose I should have done in the first place)... I'm not sure if this implementation is entirely "correct" - I have no idea what the func_code stuff is for (though if it's not commented out, the class breaks) or the __need_name__... but it works well for us :) Richard -- Richard Jones [EMAIL PROTECTED] Senior Software Developer, Bizar Software (www.bizarsoftware.com.au) CSSFile.py
Re: [Zope-dev] dtml-in batching
Brad Clements wrote: > On 24 Jan 2001, at 9:43, [EMAIL PROTECTED] wrote: > > Tres Seaver wrote: > > > > Please post this as a "Bug w/ patch" to the Collector: > > > > > > http://classic.zope.org:8080/Collector > > > > > > That way we don't lose your fix in the list traffic (losing it > > > along with our marbles is another problem :) > > > >Someone else responded to the list saying that he'd already done it. > > There was no match to my search of dtml-in though, so I've submitted a new > > bug report. > > I posted this same bug AND a patch as bug # 1566 on Aug 28th, 2000. > > http://classic.zope.org:8080/Collector/1566/view > > Sad to see its *still* pending Well that's odd - I searched the collector for "dtml-in" and got no matches. A search for "renderwb" (which is in the title) works. Looks like it doesn't search the description after all. Boo to the search engine. Just curious: why specify the browser/platform/python version stuff when the problem is independant of those things? Richard ps. Brad, sorry I referred to you as "someone else" - I lost the email with your name in it ;) -- Richard Jones [EMAIL PROTECTED] Senior Software Developer, Bizar Software (www.bizarsoftware.com.au) ___ 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] dtml-in batching
On 24 Jan 2001, at 9:43, [EMAIL PROTECTED] wrote: > Tres Seaver wrote: > > Please post this as a "Bug w/ patch" to the Collector: > > > > http://classic.zope.org:8080/Collector > > > > That way we don't lose your fix in the list traffic (losing it > > along with our marbles is another problem :) > >Someone else responded to the list saying that he'd already done it. > There was no match to my search of dtml-in though, so I've submitted a new > bug report. I posted this same bug AND a patch as bug # 1566 on Aug 28th, 2000. http://classic.zope.org:8080/Collector/1566/view Sad to see its *still* pending Brad Clements,[EMAIL PROTECTED] (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements ___ 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] CSS file serving
[EMAIL PROTECTED] writes: > That (or rather Image.File) was where I started. I decided to go with > HTMLFile as a basis so we could have some DTML in the CSS file - but > overrode it so we weren't forced to have the .dtml extension (much happier > web designers that way :) Thus, the only thing, you need to do in addition, is to set the correct content type. Dieter ___ 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] "Problem" using External Method
Ooops, replace "print self.data" with "return self.data" in the display method of my Testclass. - Original Message - From: "Chris McDonough" <[EMAIL PROTECTED]> To: "Espen Sorbye Frederiksen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, January 23, 2001 6:46 PM Subject: Re: [Zope-dev] "Problem" using External Method > Espen, > > The files that external methods actually live in are not Python modules, > like normal Python modules. Though I haven't tried your example, it's > likely that your reference to __main__ is confusing the external method > machinery. Additionally, the output of "print" doesn't go to the remote > browser, it instead goes to the console. You need to return a value to the > caller for it to be displayed on the remote browser. > > Try instead (as an example): > > class Testclass: > def setdata(self,val1,val2,val3): > self.data = [val1,val2,val3] > def updatedata(self, index): > self.data[index] = self.data[index]+1 > def display(self): > print self.data > > def createdata(): > x = Testclass() > x.setdata(10, 20, 30) > x.updatedata(2) > return x.display() > > - Original Message - > From: "Espen Sorbye Frederiksen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, January 23, 2001 5:52 PM > Subject: [Zope-dev] "Problem" using External Method > > > > The module below works using the python compiler > > class Testclass: > > def setdata(self,val1,val2,val3): > > self.data = [val1,val2,val3] > > def updatedata(self, index): > > self.data[index] = self.data[index]+1 > > def display(self): > > print self.data > > > > x = Testclass() > > def createdata(): > > import __main__ > > __main__.x.setdata(10, 20, 30) > > __main__.x.updateLog(2) > > __main__.x.display() > > > > >>>createdata() > > >>>[10,20,31] > > > > However if I try to add it as an External Method( id= createdata) it > > doesn't > > seem to work. I've tried to call it using > > without success. Any suggestions what I do wrong. > > I am grateful for all comments, > > > > Espen > > > > > > ___ > > 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 ) > > ___ 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] "Problem" using External Method
Espen, The files that external methods actually live in are not Python modules, like normal Python modules. Though I haven't tried your example, it's likely that your reference to __main__ is confusing the external method machinery. Additionally, the output of "print" doesn't go to the remote browser, it instead goes to the console. You need to return a value to the caller for it to be displayed on the remote browser. Try instead (as an example): class Testclass: def setdata(self,val1,val2,val3): self.data = [val1,val2,val3] def updatedata(self, index): self.data[index] = self.data[index]+1 def display(self): print self.data def createdata(): x = Testclass() x.setdata(10, 20, 30) x.updatedata(2) return x.display() - Original Message - From: "Espen Sorbye Frederiksen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 23, 2001 5:52 PM Subject: [Zope-dev] "Problem" using External Method > The module below works using the python compiler > class Testclass: > def setdata(self,val1,val2,val3): > self.data = [val1,val2,val3] > def updatedata(self, index): > self.data[index] = self.data[index]+1 > def display(self): > print self.data > > x = Testclass() > def createdata(): > import __main__ > __main__.x.setdata(10, 20, 30) > __main__.x.updateLog(2) > __main__.x.display() > > >>>createdata() > >>>[10,20,31] > > However if I try to add it as an External Method( id= createdata) it > doesn't > seem to work. I've tried to call it using > without success. Any suggestions what I do wrong. > I am grateful for all comments, > > Espen > > > ___ > 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] dtml-in batching
On Wed, 24 Jan 2001 [EMAIL PROTECTED] wrote: > Tres Seaver wrote: > > > Please post this as a "Bug w/ patch" to the Collector: > > > > http://classic.zope.org:8080/Collector > > > > That way we don't lose your fix in the list traffic (losing it > > along with our marbles is another problem :) > > Someone else responded to the list saying that he'd already > done it. There was no match to my search of dtml-in though, so > I've submitted a new bug report. Thanks very much! 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 )
[Zope-dev] "Problem" using External Method
The module below works using the python compiler class Testclass: def setdata(self,val1,val2,val3): self.data = [val1,val2,val3] def updatedata(self, index): self.data[index] = self.data[index]+1 def display(self): print self.data x = Testclass() def createdata(): import __main__ __main__.x.setdata(10, 20, 30) __main__.x.updateLog(2) __main__.x.display() >>>createdata() >>>[10,20,31] However if I try to add it as an External Method( id= createdata) it doesn't seem to work. I've tried to call it using without success. Any suggestions what I do wrong. I am grateful for all comments, Espen ___ 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] dtml-in batching
Tres Seaver wrote: > > [EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] wrote: > > > > > > The dtml-in batching mechanisms are quite difficult to debug - the DTML > > > documentation I have has examples which break it and there's no indication > > > of why. It turns out the DT_In renderwb() code gobbles all exceptions from > > > the rendering of the previous and next blocks. I've hacked my code so that > > > there's no try/except clause any more. I'm not sure what exception it's > > > trying to catch, but could it perhaps be made a little more picky? > > > > And here's a diff - I'm pretty sure this was the intended behaviour... > > Please post this as a "Bug w/ patch" to the Collector: > > http://classic.zope.org:8080/Collector > > That way we don't lose your fix in the list traffic (losing it > along with our marbles is another problem :) Someone else responded to the list saying that he'd already done it. There was no match to my search of dtml-in though, so I've submitted a new bug report. Richard -- Richard Jones [EMAIL PROTECTED] Senior Software Developer, Bizar Software (www.bizarsoftware.com.au) ___ 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] DTML block parsing
Casey Duncan wrote: > > Steve Alexander wrote: > > With your patch applied, will nested dtml-comment tags still work? > > > > > >Some code commented out > > > >Documentation in a comment > > > >Rest of code commented out > > > > > > -- > > Steve Alexander > > Software Engineer > > Cat-Box limited > > http://www.cat-box.net > > In present form no. It also does not support block continuation tags. > > I will see what I can do about this. OK, I have developed a new patch that almost completely fixes this issue. In fact I am happier with it in general than my first patch. There is only one flaw, although you can nest comments inside of one another, and you can have any manner of broken dtml inside, if you open another comment tag inside it, it must be properly balanced or you will get a parse error. Here are some examples: These do not generate errors with my new patch: Blah Blah These do: I am a bit concerned that should ever generate errors at all, but this is certainly an improvement. Anybody have any thoughts? -- | Casey Duncan | Kaivo, Inc. | [EMAIL PROTECTED] `--> ___ 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] ZCatalog scalability
[Michael Bernstein] | Erik Enge wrote: | > | > I don't believe that B-Tree folders have those kinds of limitations by | > general design. I'm more conserned that somewhere along the lines, | > doing operations on a huge BTree Folder (Yes, in Zope) will be slow. | | What sort of 'operations' do you mean? copying and pasting | the whole thing? My point was that anything will be slow at some stage. This is valid for BTree Folders as well, and doing opertions on the objects (copying, deleting, modifying), will be slower than adding them, I guess. I'm not quite sure here Michael, someone else has probably more experience and knowledge to answer more correctly. | I had separated the storage issue into a different thread Oops, I forgot that, sorry. | Anyway Eric, I hope that when you report your results, you're able | to separate indexing, searching, storage, and retreival results, so | that the appropriate factor can be identified as the bottleneck. Or | at least into indexing/searching and storage/retreival. Yes, I hope I'll manage to do that. And till then, I guess we just have to wait to see how things work in practice, which might be different to the theory. ;) ___ 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] ZCatalog scalability
Erik Enge wrote: > > [Chris Withers] > > | ...and is that specifically for BTree folders, or Zope BTree's in general? > > I don't believe that B-Tree folders have those kinds of limitations by > general design. I'm more conserned that somewhere along the lines, > doing operations on a huge BTree Folder (Yes, in Zope) will be slow. What sort of 'operations' do you mean? copying and pasting the whole thing? > Hm, more over, if you actually need to stuff that many objects into > one Folder, you are probably trying to use the wrong tool for the job. > > I do expect that stuffing 27 million objects into one BTree Folder > will be slow, and I don't want to segment the data. I do expect that > I'll have to resort to a relational database, and I have no problem > with that. Object databases aren't always the right tool for the job, > and when they aren't, Zope let's me talk with the «other» ones nicely, > so no problemo señor ;). Eric, I had separated the storage issue into a different thread (Specialist/Rack Scalability), and received a reply from Phillip Eby: > Just to expand a little on the abov... Racks should scale at least as > well, if not larger than a ZCatalog, given the same storage backing for > the ZODB. This is because ZCatalog has to manage a minimum of one > forward and reverse BTree for *each* index, plus another few BTrees > for overall storage and housekeeping. Also, keyword and full text > indexes store multiple BTree entries per object, so that's a factor as > well. So the question I was asking is: "if we ignore the issue of storage and consider indexing and searching the ZCatalog alone, and assuming that wildcard searches are disallowed, how far will a single ZCatalog with a text index (on a computed attribute that concatenates several properties) and a keyword index (for creating ZTopic heirarchies) scale?" While I'm perfectly willing to split up the storage of the data as neccessary, I am far less enamoured by the prospect of divvying up the indexing and searching to multiple ZCatalogs. In any case, according to Phillip, if I don't have to split the ZCatalog, I shouldn't have to split the storage (in Racks, anyway, but probably BTree Folders too), either. Anyway Eric, I hope that when you report your results, you're able to separate indexing, searching, storage, and retreival results, so that the appropriate factor can be identified as the bottleneck. Or at least into indexing/searching and storage/retreival. Thanks, Michael Bernstein. ___ 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] DTML block parsing
Steve Alexander wrote: > With your patch applied, will nested dtml-comment tags still work? > > >Some code commented out > >Documentation in a comment > >Rest of code commented out > > > -- > Steve Alexander > Software Engineer > Cat-Box limited > http://www.cat-box.net In present form no. It also does not support block continuation tags. I will see what I can do about this. -- | Casey Duncan | Kaivo, Inc. | [EMAIL PROTECTED] `--> ___ 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] Membership and the 2.3 beta2 ... bug in the latter!
> Not sur ecompletely why yet, but in 2.3b2, I can't move or copy a > ZCatalog. There is one in the Membership interface, so as a result, no > workie there. > > After deleteing int from teh membership interface folder, I get a > traceback complaining about too many arguments in checkRoles (3 > instead of > 2). I haven't had time to dig into it yet, so I thought I would > toss it up > here so anyone with visibility to this issue can look at it. Hi Bill - this was due to a problem that is fixed in CVS and will be in beta 3 (out late today or tomorrow). Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 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] Local roles and security of ZClass instances in Specialists
Steve Spicklemire wrote: > > WITH [ QUERY ] LookupAttributesAndCheckForPermission(REQUEST) COMPUTE foo, bar, baz > > where LookupAttributesAndCheckForPermission get's everything it needs out of > the REQUEST. You could use WITH CheckForPermission(REQUEST) and makeQuery() COMPUTE foo, bar, baz where CheckForPermission returns 1 if the permission is ok, or raises unauthorized otherwise. You might not need to pass in REQUEST if you're using a Python Script. You could also add in an argument to CheckForPermission that indicates the sort of permission to check for. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ 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] Local roles and security of ZClass instances in Specialists
Hi Itai, I'm sure there's something clever you could do here with an attribute provider for you user object that supplied __roles__ dynamically somehow, but I'd need to think about that more... one easy way to limit who can see different stuff is to use a wrapper around your access methods (e.g., SQL queries) that checks for security: e.g., WITH [ QUERY ] LookupAttributesAndCheckForPermission(REQUEST) COMPUTE foo, bar, baz where LookupAttributesAndCheckForPermission get's everything it needs out of the REQUEST. It's a crude tool.. but it's simple. When I get some time to think clearly.. I'll try to come up with something more general. Hopefully you'll also get some other suggestions... -steve > "Itai" == Itai Tavor <[EMAIL PROTECTED]> writes: Itai> Hi, Itai> I'm trying to work out a security strategy for data stored Itai> in Specialists, where specific users need access to specific Itai> data instances. Itai> For example: A Customer object is linked to a Person and Itai> Address objects. The customer needs permission to edit the Itai> her - and only her - Address object. Using the Owner local Itai> role won't work, because customers can be registered by site Itai> managers and customer support people, in which case Owner Itai> won't be the customer. Itai> I can solve this by giving the customer a local role when Itai> creating her Address object: Itai> Customers.addCustomer(REQUEST): ni = Itai> container.addItem(some_id) Itai> container.Addresses.addAddressFor(ni.id, REQUEST) Itai> Addresses.addAddressFor(for_id, REQUEST): ni = Itai> container.addItem(some_id) ni.manage_addLocalRole(for_id, Itai> 'EditMyDetails') Itai> But this can be a lot of work - If an Address object can Itai> also be created for a CreditCard object, addCreditCard will Itai> have to both set its own local role, and pass the customer Itai> id on to Address... Itai> But the main problem is that I'm not sure if it will work at Itai> all - can local roles be set for DataSkins that aren't Itai> stored in the ZODB? From what I can see ZPatterns doesn't Itai> support this, so I'll have to do it Itai> myself. __ac_local_roles__ can't be accessed in a SkinScript Itai> - so will I have to override has_local_roles, Itai> get_local_roles and get_local_roles_for_userid and call them Itai> from the SkinScript? This is getting hairy... Itai> Without local roles, all I can think of is explicitly Itai> checking that the logged in user is the right customer in Itai> all the methods that display and edit the object, which is Itai> very ugly. Plus it would require Address to know a Itai> customer_id even when it actually belongs to a CreditCard, Itai> not a Customer... there goes Demeter. Or I can add a Itai> findUserID to Address, CreditCard and Customer, all of which Itai> pass the request upwards until one is reached that actually Itai> knows the customer. Still ugly. Itai> TIA for Any comments/suggestions. Itai> Itai -- Itai Tavor "Je sautille, donc je suis." C3Works Itai> [EMAIL PROTECTED] - Kermit the Frog Itai> "If you haven't got your health, you haven't got anything" Itai> ___ Zope-Dev Itai> maillist - [EMAIL PROTECTED] Itai> http://lists.zope.org/mailman/listinfo/zope-dev ** No cross Itai> posts or HTML encoding! ** (Related lists - Itai> http://lists.zope.org/mailman/listinfo/zope-announce Itai> 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] DTML block parsing
Casey Duncan wrote: > > If not, I will make a patch for DT_String to support this. The > beneficial side affect would be that could be "fixed" so > that its contents need not be parsable anymore, just like every other > language I know of. With your patch applied, will nested dtml-comment tags still work? Some code commented out Documentation in a comment Rest of code commented out -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ 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] ZCatalog scalability
[Chris Withers] | ...and is that specifically for BTree folders, or Zope BTree's in general? I don't believe that B-Tree folders have those kinds of limitations by general design. I'm more conserned that somewhere along the lines, doing operations on a huge BTree Folder (Yes, in Zope) will be slow. However, this is more gut-feeling than anything else. Hm, more over, if you actually need to stuff that many objects into one Folder, you are probably trying to use the wrong tool for the job. I do expect that stuffing 27 million objects into one BTree Folder will be slow, and I don't want to segment the data. I do expect that I'll have to resort to a relational database, and I have no problem with that. Object databases aren't always the right tool for the job, and when they aren't, Zope let's me talk with the «other» ones nicely, so no problemo señor ;). ___ 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] dtml-in batching
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > > > The dtml-in batching mechanisms are quite difficult to debug - the DTML > > documentation I have has examples which break it and there's no indication > > of why. It turns out the DT_In renderwb() code gobbles all exceptions from > > the rendering of the previous and next blocks. I've hacked my code so that > > there's no try/except clause any more. I'm not sure what exception it's > > trying to catch, but could it perhaps be made a little more picky? > > And here's a diff - I'm pretty sure this was the intended behaviour... Please post this as a "Bug w/ patch" to the Collector: http://classic.zope.org:8080/Collector That way we don't lose your fix in the list traffic (losing it along with our marbles is another problem :) 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] ZCatalog scalability
Erik Enge wrote: > > I don't know. But there is one on BTree folders, right? Really? Anyone got a figure for that? ...and is that specifically for BTree folders, or Zope BTree's in general? 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 )
Re: [Zope-dev] sql methods and the namespace stack
Tim McLaughlin wrote: > > Does anybody know why sql methods only search the request object instead of > traversing the dtml namespace stack? Nope, other than it's been like that for donkey's years... I guess the idea was that it didn't accidentally get parameters from elsewhere, which can be an issue, but not only for SQL Methods... 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 )
Re: [Zope-dev] ZCatalog scalability
[Michael Bernstein] | We seem to have disposed of the wildcard issue [snipped out | below], and I'm looking forward to Eric's results, but does | anyone else have any information about whether there is a | practical upper limit on how many objects can be indexed and | searched in a ZCatalog? I don't know. But there is one on BTree folders, right? And as soon as those get «full», you need to start segment your data (which you probably would have done in the first place anyway). Then you can use several ZCatalogs in different locations (so that they don't carry so many objects each). Then create a nice little method that finds out which (or all) of the ZCatalogs to ask, when users make queries. ___ 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 )