Re: [Zope] persistence and dictionaries - new light
I tried a few things out it seems the following is happening : the methods that seemed to be activating persistence when I thought they shouldn't are called through my handle to the manage_edit ... i.e. in the product I sent this was anything called within def manage_edit(self, title, REQUEST=None): blah If I call the same methods from another method in the product, and then call that method from say a dtmlMethod then persotence failed unless I use _p_changed. This would go along with what Chris mentioned. So it seems that def manage_edit has a special behaviour, possible linked to it's binding to manage_main = HTMLFile('boringEdit', globals()) # Management Interface which is linked to manage_options = ( {'label': 'Edit', 'action': 'manage_main'}, hopefully someone has an answer to that. regards Matt Jonothan Farr wrote: > Oops. You snipped the contents of MoreStuff.addStuff(). No way to tell what's > going on without that! > --jfarr > > - Original Message - > From: "Matt" <[EMAIL PROTECTED]> > To: "Jonothan Farr" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Friday, December 08, 2000 2:39 PM > Subject: Re: [Zope] persistence and dictionaries > > > Ok, here are some of the offending bits out of my boringplus product > > which I can send again if people want. I have > > another product that keeps a dictionary of cookies so I can see how many > > times someone uses the back button to > > access the same forms page again. This worked as expected, where I had > > to issue an _p_changed=1 to get them to > > persist. But I am doing a similar thing below, or so I thought, once > > with a dictionary in the product and once in a > > dictionary within a class that does not inherit Persistent. This is > > what is confusing. Through restarts etc, everything > > perisists > > > > > > class Boring( > > OFS.SimpleItem.Item, # A simple Principia object. Not Folderish. > > Persistent,# Make us persistent. Yaah! > > Acquisition.Implicit, # Uh, whatever. > > AccessControl.Role.RoleManager # Security manager. > > ): > > > > > > def __init__(self, id, title=''): > > self._things = {} > > self._more = myClass.MoreStuff() > > > > > > def manage_edit(self, title, REQUEST=None): > >if REQUEST is not None: > > if REQUEST.has_key('thing'): > > self._things[REQUEST['thing']] = REQUEST['thing_value'] > > self.addToMore(REQUEST['thing'],REQUEST['thing_value']) > > > > > > def addToMore(self,name,value): > > self._more.addStuff(name,value) > > return "" > > > > > > class MoreStuff: > > > > def __init__(self): > > self._stuff = {'animal':'monkey'} > > > > def addStuff(self,stuff_name,stuff_item): > > > > > > On Sat, 09 Dec 2000, Jonothan Farr wrote: > > > Maybe I'm mistaken, but it seems like you can put an instance of an > > object that > > > doesn't inherit from Persistent into the ZODB just fine, but its > > contents won't > > > persist, so you'll always end up with a copy of the object as it was > > first added > > > to the database. > > > > > > --jfarr > > > > > > - Original Message - > > > From: "Chris McDonough" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Cc: <[EMAIL PROTECTED]> > > > Sent: Friday, December 08, 2000 11:57 AM > > > Subject: Re: [Zope] persistence and dictionaries > > > > > > > > > > Huh. If they do, it's by chance only. I'd be hard-pressed to > > explain it. > > > > > > > > Do they inherit from *anything*? > > > > > > > > - Original Message - > > > > From: "Matt" <[EMAIL PROTECTED]> > > > > To: "Chris McDonough" <[EMAIL PROTECTED]> > > > > Cc: <[EMAIL PROTECTED]> > > > > Sent: Friday, December 08, 2000 2:30 PM > > > > Subject: Re: [Zope] persistence and dictionaries > > > > > > > > > > > > > Chris, this was my original confusion the two places below > > where you > > > > say > > > > > > > > > > "You can put instances which do not inherit from > > Persistence.Persistent in > > > > > your database. They just won't "stick". They'll hang around > > until the > > > > > server is restarted or for an undetermined amount of time during > > normal > > > > > operations." > > > > > > > > > > "No. It'll work for "a while" or until the server is restarted. > > :-)" > > > > > > > > > > actually do persist after restarts ... that's what confused me, > > they > > > > wouldn't > > > > > go away and they should!! > > > > > > > > > > regards > > > > > Matt > > > > > > > > > > Chris McDonough wrote: > > > > > > > > > > > > Thanks for the reply, that is really useful. There are a > > couple of > > > > things > > > > > > > though that still don't add up. Firstly, you say below, as do > > all the > > > > > > ZODB > > > > > > > documents that "Custom" classes can certainly persist, they > > just need > > > > to > > > > > > mix in > > > > > > > the "Persistence.Persistent" class as a base class. Well, in > > my > > > > example I > > > > > > > attached
Re: [Zope] persistence and dictionaries
um, nope, that's all there is to that class I'll attach the whole product Matt Jonothan Farr wrote: > Oops. You snipped the contents of MoreStuff.addStuff(). No way to tell what's > going on without that! > --jfarr > > - Original Message - > From: "Matt" <[EMAIL PROTECTED]> > To: "Jonothan Farr" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Friday, December 08, 2000 2:39 PM > Subject: Re: [Zope] persistence and dictionaries > > > Ok, here are some of the offending bits out of my boringplus product > > which I can send again if people want. I have > > another product that keeps a dictionary of cookies so I can see how many > > times someone uses the back button to > > access the same forms page again. This worked as expected, where I had > > to issue an _p_changed=1 to get them to > > persist. But I am doing a similar thing below, or so I thought, once > > with a dictionary in the product and once in a > > dictionary within a class that does not inherit Persistent. This is > > what is confusing. Through restarts etc, everything > > perisists > > > > > > class Boring( > > OFS.SimpleItem.Item, # A simple Principia object. Not Folderish. > > Persistent,# Make us persistent. Yaah! > > Acquisition.Implicit, # Uh, whatever. > > AccessControl.Role.RoleManager # Security manager. > > ): > > > > > > def __init__(self, id, title=''): > > self._things = {} > > self._more = myClass.MoreStuff() > > > > > > def manage_edit(self, title, REQUEST=None): > >if REQUEST is not None: > > if REQUEST.has_key('thing'): > > self._things[REQUEST['thing']] = REQUEST['thing_value'] > > self.addToMore(REQUEST['thing'],REQUEST['thing_value']) > > > > > > def addToMore(self,name,value): > > self._more.addStuff(name,value) > > return "" > > > > > > class MoreStuff: > > > > def __init__(self): > > self._stuff = {'animal':'monkey'} > > > > def addStuff(self,stuff_name,stuff_item): > > > > > > On Sat, 09 Dec 2000, Jonothan Farr wrote: > > > Maybe I'm mistaken, but it seems like you can put an instance of an > > object that > > > doesn't inherit from Persistent into the ZODB just fine, but its > > contents won't > > > persist, so you'll always end up with a copy of the object as it was > > first added > > > to the database. > > > > > > --jfarr > > > > > > - Original Message - > > > From: "Chris McDonough" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Cc: <[EMAIL PROTECTED]> > > > Sent: Friday, December 08, 2000 11:57 AM > > > Subject: Re: [Zope] persistence and dictionaries > > > > > > > > > > Huh. If they do, it's by chance only. I'd be hard-pressed to > > explain it. > > > > > > > > Do they inherit from *anything*? > > > > > > > > - Original Message - > > > > From: "Matt" <[EMAIL PROTECTED]> > > > > To: "Chris McDonough" <[EMAIL PROTECTED]> > > > > Cc: <[EMAIL PROTECTED]> > > > > Sent: Friday, December 08, 2000 2:30 PM > > > > Subject: Re: [Zope] persistence and dictionaries > > > > > > > > > > > > > Chris, this was my original confusion the two places below > > where you > > > > say > > > > > > > > > > "You can put instances which do not inherit from > > Persistence.Persistent in > > > > > your database. They just won't "stick". They'll hang around > > until the > > > > > server is restarted or for an undetermined amount of time during > > normal > > > > > operations." > > > > > > > > > > "No. It'll work for "a while" or until the server is restarted. > > :-)" > > > > > > > > > > actually do persist after restarts ... that's what confused me, > > they > > > > wouldn't > > > > > go away and they should!! > > > > > > > > > > regards > > > > > Matt > > > > > > > > > > Chris McDonough wrote: > > > > > > > > > > > > Thanks for the reply, that is really useful. There are a > > couple of > > > > things > > > > > > > though that still don't add up. Firstly, you say below, as do > > all the > > > > > > ZODB > > > > > > > documents that "Custom" classes can certainly persist, they > > just need > > > > to > > > > > > mix in > > > > > > > the "Persistence.Persistent" class as a base class. Well, in > > my > > > > example I > > > > > > > attached in my first email, my product certainly has > > > > > > Persistence.Persistent, > > > > > > > but my second class that I add to this one does not, yet it > > still > > > > > > persists. > > > > > > > There was an email sometime ago on the mailing list that told > > someone > > > > that > > > > > > this > > > > > > > was why their product instances disappearing from the ZODB. > > > > > > > (the ref for the original email is : > > > > > > http://www.egroups.com/message/zope/44263 > > > > > > > ... I can't find the reply again.) > > > > > > > > > > > > > > > > > > > You can put instances which do not inherit from > > Persistence.Persistent > > > > in > > > > > > your database. They just won't "stick". They'll hang around > > until the > > > > >
[Zope] Submit your software to BlueChillies.com
Hi, We are pleased to inform you that we have launched a new website containing shareware, freeware and demoware resources. We have invested a great deal of time and money in making BlueChillies.com the best shareware and freeware website. BlueChillies.com lists Windows, Macintosh, BeOS, DOS, Windows CE, Palm OS, and Linux/UNIX software which are organized to more than 200 categories including Games, Utilities, Drivers, MP3 and Audio, Multimedia, Internet, Business, HTML and more! For this purpose, please submit your shareware and freeware to BlueChillies. Listing your software with BlueChillies.com gives your software global exposure! To submit a software, you must have a BlueChillies ID and Password that can be obtained by filling out our registration form at http://BlueChillies.com/join.php. This is for security reason so that your software details cannot be modified by someone else. Afterward, you can start to submit software by clicking "Add a Listing" at the bottom of the page. We also accept PAD files! Just go to http://BlueChillies.com/pad.php and submit your PAD files. You don't need to register first. It's very simple and easy. I would be very grateful if you could submit your software at your earliest convenience. Should you have any questions, please do not hesitate to contact us at [EMAIL PROTECTED] Your faithfully, Joseph Hadinata President & CEO BlueChillies.com http://BlueChillies.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] PythonMethod (0.1.6) ZEO weirdnesss
Hi, We've got a 2 client ZEO cluster working fine, with a number of PythonMethods (ver 0.1.6). When I tried adding a 3rd ZEO client, which I am pretty sure is set up in the same way as the other clients, PythonMethods created via the original clients barf when viewed on the new client. Wierdly, PythonMethods created in the new client work fine on all three. Any idea what is happening here? thanks d The traceback is as follows: Traceback (innermost last): File D:\dyon\DYONZO~1\lib\python\ZPublisher\Publish.py, line 222, in publish_module File D:\dyon\DYONZO~1\lib\python\ZPublisher\Publish.py, line 187, in publish File D:\dyon\DYONZO~1\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File D:\dyon\DYONZO~1\lib\python\ZPublisher\Publish.py, line 171, in publish File D:\dyon\DYONZO~1\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: pytest) File D:\dyon\DYONZO~1\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: pytest) File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\PythonMethod.py, line 163, in __call__ (Object: pytest) File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\PythonMethod.py, line 144, in makeFunction (Object: pytest) File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\PythonMethod.py, line 126, in _newfun (Object: pytest) File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\zbytecodehacks\VSExec.py, line 344, in UntupleFunction File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\zbytecodehacks\code_editor.py, line 260, in __init__ File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\zbytecodehacks\code_editor.py, line 267, in __init__ (Object: pytest) File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\zbytecodehacks\code_editor.py, line 287, in init_tuple (Object: pytest) File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\zbytecodehacks\code_editor.py, line 162, in __init__ File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\zbytecodehacks\code_editor.py, line 177, in __init__ File D:\dyon\dyonzope224\lib\python\Products\PythonMethod\zbytecodehacks\code_editor.py, line 217, in init_tuple ValueError: unpack tuple of wrong size -- Dyon Balding <[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] persistence and dictionaries
Oops. You snipped the contents of MoreStuff.addStuff(). No way to tell what's going on without that! --jfarr - Original Message - From: "Matt" <[EMAIL PROTECTED]> To: "Jonothan Farr" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, December 08, 2000 2:39 PM Subject: Re: [Zope] persistence and dictionaries > Ok, here are some of the offending bits out of my boringplus product > which I can send again if people want. I have > another product that keeps a dictionary of cookies so I can see how many > times someone uses the back button to > access the same forms page again. This worked as expected, where I had > to issue an _p_changed=1 to get them to > persist. But I am doing a similar thing below, or so I thought, once > with a dictionary in the product and once in a > dictionary within a class that does not inherit Persistent. This is > what is confusing. Through restarts etc, everything > perisists > > > class Boring( > OFS.SimpleItem.Item, # A simple Principia object. Not Folderish. > Persistent,# Make us persistent. Yaah! > Acquisition.Implicit, # Uh, whatever. > AccessControl.Role.RoleManager # Security manager. > ): > > > def __init__(self, id, title=''): > self._things = {} > self._more = myClass.MoreStuff() > > > def manage_edit(self, title, REQUEST=None): >if REQUEST is not None: > if REQUEST.has_key('thing'): > self._things[REQUEST['thing']] = REQUEST['thing_value'] > self.addToMore(REQUEST['thing'],REQUEST['thing_value']) > > > def addToMore(self,name,value): > self._more.addStuff(name,value) > return "" > > > class MoreStuff: > > def __init__(self): > self._stuff = {'animal':'monkey'} > > def addStuff(self,stuff_name,stuff_item): > > > On Sat, 09 Dec 2000, Jonothan Farr wrote: > > Maybe I'm mistaken, but it seems like you can put an instance of an > object that > > doesn't inherit from Persistent into the ZODB just fine, but its > contents won't > > persist, so you'll always end up with a copy of the object as it was > first added > > to the database. > > > > --jfarr > > > > - Original Message - > > From: "Chris McDonough" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Friday, December 08, 2000 11:57 AM > > Subject: Re: [Zope] persistence and dictionaries > > > > > > > Huh. If they do, it's by chance only. I'd be hard-pressed to > explain it. > > > > > > Do they inherit from *anything*? > > > > > > - Original Message - > > > From: "Matt" <[EMAIL PROTECTED]> > > > To: "Chris McDonough" <[EMAIL PROTECTED]> > > > Cc: <[EMAIL PROTECTED]> > > > Sent: Friday, December 08, 2000 2:30 PM > > > Subject: Re: [Zope] persistence and dictionaries > > > > > > > > > > Chris, this was my original confusion the two places below > where you > > > say > > > > > > > > "You can put instances which do not inherit from > Persistence.Persistent in > > > > your database. They just won't "stick". They'll hang around > until the > > > > server is restarted or for an undetermined amount of time during > normal > > > > operations." > > > > > > > > "No. It'll work for "a while" or until the server is restarted. > :-)" > > > > > > > > actually do persist after restarts ... that's what confused me, > they > > > wouldn't > > > > go away and they should!! > > > > > > > > regards > > > > Matt > > > > > > > > Chris McDonough wrote: > > > > > > > > > > Thanks for the reply, that is really useful. There are a > couple of > > > things > > > > > > though that still don't add up. Firstly, you say below, as do > all the > > > > > ZODB > > > > > > documents that "Custom" classes can certainly persist, they > just need > > > to > > > > > mix in > > > > > > the "Persistence.Persistent" class as a base class. Well, in > my > > > example I > > > > > > attached in my first email, my product certainly has > > > > > Persistence.Persistent, > > > > > > but my second class that I add to this one does not, yet it > still > > > > > persists. > > > > > > There was an email sometime ago on the mailing list that told > someone > > > that > > > > > this > > > > > > was why their product instances disappearing from the ZODB. > > > > > > (the ref for the original email is : > > > > > http://www.egroups.com/message/zope/44263 > > > > > > ... I can't find the reply again.) > > > > > > > > > > > > > > > > You can put instances which do not inherit from > Persistence.Persistent > > > in > > > > > your database. They just won't "stick". They'll hang around > until the > > > > > server is restarted or for an undetermined amount of time during > normal > > > > > operations. > > > > > > > > > > > So my current understanding would be that any classes you want > to add > > > in > > > > > do not > > > > > > need to derive from Persistence.Persistent, and if it is > pickleable > > > then > > > > > all > > > > > > should be fine if you call on instances of that object within >
[Zope] Re: [Zope-Annce] SECURITY alert and hotfix release
On Fri, Dec 08, 2000 at 03:48:52PM -0500, Brian Lloyd wrote: > The hotfix will work for all versions of Zope 2.2.0 and higher. A > future version of Zope will contain the fix for this > issue, and you will be able to uninstall the hot fix after upgrading. A slight modification to the patch makes it work (meaning, "run without raising an exception") on Zope 2.1.6; patch below. Can someone at DC confirm that this patched version fixes the problem for 2.1.x and doesn't break anything else? (If you want to privately send me an exploit, that would be quite helpful.) --amk --- __init__.py Fri Dec 8 15:25:48 2000 +++ /home/akuchlin/__init__.py Fri Dec 8 17:09:05 2000 @@ -107,13 +107,14 @@ # and make sure the roles are set correctly. import OFS +from OFS import DTMLMethod, DTMLDocument from AccessControl.PermissionRole import PermissionRole OM = OFS.ObjectManager.ObjectManager legacy = ( -('manage_addDocument', OFS.DTMLMethod.addDTMLMethod), -('manage_addDTMLMethod', OFS.DTMLMethod.addDTMLMethod), -('manage_addDTMLDocument', OFS.DTMLDocument.addDTMLDocument), +('manage_addDocument', DTMLMethod.addDTMLMethod), +('manage_addDTMLMethod', DTMLMethod.addDTMLMethod), +('manage_addDTMLDocument', DTMLDocument.addDTMLDocument), ) permission = 'Add Documents, Images, and Files' ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Microsoft IIS 4.0 and Zope
That's exactly what I do, use Apache and ProxyPass to provide a unified URLspacebetween IIS and Zope. Works well! - Original Message - From: "Petter Enholm" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, December 08, 2000 3:17 PM Subject: Re: [Zope] Microsoft IIS 4.0 and Zope > The easiest thing to do (for me now) is to add Apache as front-end > web-server for both IIS and Zope. The access to documentation, well tested > and documented rules for rewriting, lots of HOW-TO's, mailing lists etc > makes this a good choice - open source rules! > > Any comments on running Apache as front-end for IIS 4.0 and Zope? I would > gladly throw out the IIS server, but my customers has software that relies > on this server. > > Best regards > Petter Enholm > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Friday, December 08, 2000 4:05 PM > Subject: RE: [Zope] Microsoft IIS 4.0 and Zope > > > > Hi Petter, > > > > I have the same problem. Could you tell me if you find a way? I > > hope someone on this list have an answer! > > > > > > > > -Message d'origine- > > De : Petter Enholm [mailto:[EMAIL PROTECTED]] > > Envoyé : vendredi 8 décembre 2000 07:53 > > À : [EMAIL PROTECTED] > > Objet : [Zope] Microsoft IIS 4.0 and Zope > > > > > > Hi, > > > > This may be more of a Microsoft IIS questions than Zope question, but I > give > > it a shot! > > > > I have installed Zope (on port 8080) on a Windows NT 4.0 server with IIS > > 4.0, followed to Howto that explains how to set up PCGI with IIS, and all > > works very well. I can access Zope through > > http://localhost/scripts/zope.pcgi > > > > Next step: I want to access the Zope site through a given DNS name, f eks > > www.mydomain.com. How can I do this with IIS 4.0? I find no way to > redirect > > a virtual host and at the same time rewrite the URL so that the user gets > > http://www.mydomain.com in the browser, not .../scripts/zope.pcgi. > > > > Anybody out there with knowledge on this issue? > > > > Best regards > > > > Petter Enholm > > Snapper as > > > > > > ___ > > Zope maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope > > ** 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] Failed upgrade to 2.2.4 - solutions?
Michel Pelletier wrote: > bash$: export PROFILE_PUBLISHER=/home/luke/sw/zopeProfile.txt > bash$: python z2.py -D Tried that. Nothing written to the text file. But I did get this after doing a control-c ... --- File "z2.py", line 537, in ? Traceback (innermost last): File "z2.py", line 719, in ? asyncore.loop() zdaemon.run(sys.argv, os.path.join(CLIENT_HOME, Zpid)) File "/home/luke/sw/zope224/lib/python/zdaemon.py", line 208, in run p,s = os.waitpid(pid, 0) File "/home/luke/sw/zope224/ZServer/medusa/asyncore.py", line 138, in loop KeyboardInterrupt luke$ poll_fun (timeout, map) File "/home/luke/sw/zope224/ZServer/medusa/asyncore.py", line 66, in poll r,w,e = select.select (r,w,e, timeout) --- With the python 1.5.2 source I did a make test, and it failed on test_fcntl. With the python 2.0 source I did a make test, and Python core dumped on test_poll. I'm guessing, but it looks like Zope on my box has a poll issue. > It's possible you have library missmatch. Python library or C library? I made pretty certain that I'd removed all traces of Python from the box before reinstalling. /usr/local/bin /usr/local/lib /usr/local/include Luke ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Weird ZCatalog problem... bug?
On my developmet box, I'm using Zope 2.2.1 and ZCatalog to index ZClass-based classified ad objects; for some reason on sort="title" in the ... URL looks like results?title=&AdBody=par*&WeightWords=&fieldsort=title&SUBMIT=Submit+Query Thanks, Sean = Sean Upton Senior Programmer/Analyst SignOnSanDiego.com The San Diego Union-Tribune 619.718.5241 [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] persistence and dictionaries
Maybe I'm mistaken, but it seems like you can put an instance of an object that doesn't inherit from Persistent into the ZODB just fine, but its contents won't persist, so you'll always end up with a copy of the object as it was first added to the database. --jfarr - Original Message - From: "Chris McDonough" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, December 08, 2000 11:57 AM Subject: Re: [Zope] persistence and dictionaries > Huh. If they do, it's by chance only. I'd be hard-pressed to explain it. > > Do they inherit from *anything*? > > - Original Message - > From: "Matt" <[EMAIL PROTECTED]> > To: "Chris McDonough" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Friday, December 08, 2000 2:30 PM > Subject: Re: [Zope] persistence and dictionaries > > > > Chris, this was my original confusion the two places below where you > say > > > > "You can put instances which do not inherit from Persistence.Persistent in > > your database. They just won't "stick". They'll hang around until the > > server is restarted or for an undetermined amount of time during normal > > operations." > > > > "No. It'll work for "a while" or until the server is restarted. :-)" > > > > actually do persist after restarts ... that's what confused me, they > wouldn't > > go away and they should!! > > > > regards > > Matt > > > > Chris McDonough wrote: > > > > > > Thanks for the reply, that is really useful. There are a couple of > things > > > > though that still don't add up. Firstly, you say below, as do all the > > > ZODB > > > > documents that "Custom" classes can certainly persist, they just need > to > > > mix in > > > > the "Persistence.Persistent" class as a base class. Well, in my > example I > > > > attached in my first email, my product certainly has > > > Persistence.Persistent, > > > > but my second class that I add to this one does not, yet it still > > > persists. > > > > There was an email sometime ago on the mailing list that told someone > that > > > this > > > > was why their product instances disappearing from the ZODB. > > > > (the ref for the original email is : > > > http://www.egroups.com/message/zope/44263 > > > > ... I can't find the reply again.) > > > > > > > > > > You can put instances which do not inherit from Persistence.Persistent > in > > > your database. They just won't "stick". They'll hang around until the > > > server is restarted or for an undetermined amount of time during normal > > > operations. > > > > > > > So my current understanding would be that any classes you want to add > in > > > do not > > > > need to derive from Persistence.Persistent, and if it is pickleable > then > > > all > > > > should be fine if you call on instances of that object within you > product. > > > > > > No. It'll work for "a while" or until the server is restarted. :-) > > > > > > > The next part that worried me came from the "python product tutorial" > > > > http://www.zope.org/Members/hathawsh/PythonProductTutorial > > > > > > > > This stated that the class dictionary self.votes = {} needed to be > changed > > > to > > > > self._votes = Globals.PersistentMapping() so that updates to it > persist. > > > > Hence my query about dictionaries. > > > > > > This was for convenience, I'd imagine. > > > > > > > I also noticed your comment about __setstate__ . What is it about > this > > > that is > > > > dangerous. > > > > > > Nothing implicitly dangerous, but it can get confusing if you have > multiple > > > revisions of your product and you use variables caused by __setstate__. > > > Also, once you add a __setstate__ which modifies the object in-place, > > > there's a likelihood that it can never go away (you're can never be sure > if > > > all instances have been updated). > > > > > > > Recently I built a product out of some python classes I wrapped > > > > around 4DOM, and since 4DOM documents do not seem to persist(well the > > > document > > > > does, but it loses all its children), then I persisted them to the > local > > > file > > > > system, since I needed to do that anyway for what I was doing. > Setstate > > > seemed > > > > to work nicely to bring them back, though watching its behaviour I > noticed > > > that > > > > it was called very often by zope. > > > > > > Sure, that works... although at that point you're creating your own > object > > > database. :-) > > > > > > > > > > > Chris McDonough wrote: > > > > > > > > > All pickleable Python primitive types (strings, dictionaries, lists, > > > Nones, > > > > > integers, floats, longs, etc.) can live in the ZODB. They can > persist > > > just > > > > > like instances that inherit from the Persistent class. > > > > > > > > > > I think you read a little too much in to the fact that you need to > > > "treat > > > > > mutable objects immutably" when working with them in the ZODB. This > > > > > statement doesn't mean that these kinds of objects can't be saved in > the > > > > >
Re: [Zope] Failed upgrade to 2.2.4 - solutions?
Hello > To enable profiling, restart the Zope process with the environment > variable PROFILE_PUBLISHER defined. The value of this variable should be > the full system path to a file that will be used to dump a profile report > when the process restarts or exits. PROFILE_PUBLISHER='/home/luke/sw/zopeProfile.txt' like so in my z2.py? it didn't do anything. But I can get a python core dump! I tried just a basic install, without my Data.fs. Same result. I tried 2.2.2. Same result. Looks like an incompatibility with OpenBSD 2.8 (I was running 2.7 until 2 weeks ago.) Any ideas? C-compiler or Python incompatibility between what is on OpenBSD 2.8 and Zope? OpenBSD 2.8 comes with Python 1.6. I removed all traces of Python and reinstalled 1.52 from the source. Luke ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Disabling Services : WebDAV
Chris Withers wrote: > Great :-( > > Any other way to turn WebDAV off? Not sure about Zopes supprot and not > sure if I like the protocol on production servers anyway ;-) As I'm sure someone has explained, WebDAV is just HTTP on crack. HTTP requests go like so: GET / HTTP/1.0 Webdav requests are *exactly the same* except sometimes it has something in lieu of 'GET'. ~ethan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] persistence and dictionaries
Ok, here are some of the offending bits out of my boringplus product which I can send again if people want. I have another product that keeps a dictionary of cookies so I can see how many times someone uses the back button to access the same forms page again. This worked as expected, where I had to issue an _p_changed=1 to get them to persist. But I am doing a similar thing below, or so I thought, once with a dictionary in the product and once in a dictionary within a class that does not inherit Persistent. This is what is confusing. Through restarts etc, everything perisists class Boring( OFS.SimpleItem.Item, # A simple Principia object. Not Folderish. Persistent,# Make us persistent. Yaah! Acquisition.Implicit, # Uh, whatever. AccessControl.Role.RoleManager # Security manager. ): def __init__(self, id, title=''): self._things = {} self._more = myClass.MoreStuff() def manage_edit(self, title, REQUEST=None): if REQUEST is not None: if REQUEST.has_key('thing'): self._things[REQUEST['thing']] = REQUEST['thing_value'] self.addToMore(REQUEST['thing'],REQUEST['thing_value']) def addToMore(self,name,value): self._more.addStuff(name,value) return "" class MoreStuff: def __init__(self): self._stuff = {'animal':'monkey'} def addStuff(self,stuff_name,stuff_item): On Sat, 09 Dec 2000, Jonothan Farr wrote: > Maybe I'm mistaken, but it seems like you can put an instance of an object that > doesn't inherit from Persistent into the ZODB just fine, but its contents won't > persist, so you'll always end up with a copy of the object as it was first added > to the database. > > --jfarr > > - Original Message - > From: "Chris McDonough" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Friday, December 08, 2000 11:57 AM > Subject: Re: [Zope] persistence and dictionaries > > > > Huh. If they do, it's by chance only. I'd be hard-pressed to explain it. > > > > Do they inherit from *anything*? > > > > - Original Message - > > From: "Matt" <[EMAIL PROTECTED]> > > To: "Chris McDonough" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Friday, December 08, 2000 2:30 PM > > Subject: Re: [Zope] persistence and dictionaries > > > > > > > Chris, this was my original confusion the two places below where you > > say > > > > > > "You can put instances which do not inherit from Persistence.Persistent in > > > your database. They just won't "stick". They'll hang around until the > > > server is restarted or for an undetermined amount of time during normal > > > operations." > > > > > > "No. It'll work for "a while" or until the server is restarted. :-)" > > > > > > actually do persist after restarts ... that's what confused me, they > > wouldn't > > > go away and they should!! > > > > > > regards > > > Matt > > > > > > Chris McDonough wrote: > > > > > > > > Thanks for the reply, that is really useful. There are a couple of > > things > > > > > though that still don't add up. Firstly, you say below, as do all the > > > > ZODB > > > > > documents that "Custom" classes can certainly persist, they just need > > to > > > > mix in > > > > > the "Persistence.Persistent" class as a base class. Well, in my > > example I > > > > > attached in my first email, my product certainly has > > > > Persistence.Persistent, > > > > > but my second class that I add to this one does not, yet it still > > > > persists. > > > > > There was an email sometime ago on the mailing list that told someone > > that > > > > this > > > > > was why their product instances disappearing from the ZODB. > > > > > (the ref for the original email is : > > > > http://www.egroups.com/message/zope/44263 > > > > > ... I can't find the reply again.) > > > > > > > > > > > > > You can put instances which do not inherit from Persistence.Persistent > > in > > > > your database. They just won't "stick". They'll hang around until the > > > > server is restarted or for an undetermined amount of time during normal > > > > operations. > > > > > > > > > So my current understanding would be that any classes you want to add > > in > > > > do not > > > > > need to derive from Persistence.Persistent, and if it is pickleable > > then > > > > all > > > > > should be fine if you call on instances of that object within you > > product. > > > > > > > > No. It'll work for "a while" or until the server is restarted. :-) > > > > > > > > > The next part that worried me came from the "python product tutorial" > > > > > http://www.zope.org/Members/hathawsh/PythonProductTutorial > > > > > > > > > > This stated that the class dictionary self.votes = {} needed to be > > changed > > > > to > > > > > self._votes = Globals.PersistentMapping() so that updates to it > > persist. > > > > > Hence my query about dictionaries. > > > > > > > > This was for convenience, I'd imagine. > > > > > > > > > I also noticed your comment about
Re: [Zope] Re: [Zope-Annce] SECURITY alert and hotfix release
Andrew Kuchling wrote: > > On Fri, Dec 08, 2000 at 03:48:52PM -0500, Brian Lloyd wrote: > > The hotfix will work for all versions of Zope 2.2.0 and higher. A > > future version of Zope will contain the fix for this > > issue, and you will be able to uninstall the hot fix after upgrading. > > A slight modification to the patch makes it work (meaning, "run > without raising an exception") on Zope 2.1.6; patch below. Can > someone at DC confirm that this patched version fixes the problem for > 2.1.x and doesn't break anything else? (If you want to privately send > me an exploit, that would be quite helpful.) AFAICT 2.1.6 is not vulnerable. Shane ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Applying hotfix to running zope
Oliver Sturm wrote: > is there a way to apply a patch like the current hotfix product to a > running zope without restarting the process? It might be possible with some future hotfixes, but not this one, since it modifies the initialization procedure. Shane ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Applying hotfix to running zope
Hi, is there a way to apply a patch like the current hotfix product to a running zope without restarting the process? MfG, Oliver Sturm -- GUI (gooey): What your computer becomes after spilling your coffee on it. -- Oliver Sturm / <[EMAIL PROTECTED]> Key ID: 71D86996 Fingerprint: 8085 5C52 60B8 EFBD DAD0 78B8 CE7F 38D7 71D8 6996 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] persistence and dictionaries
Chris, this was my original confusion the two places below where you say "You can put instances which do not inherit from Persistence.Persistent in your database. They just won't "stick". They'll hang around until the server is restarted or for an undetermined amount of time during normal operations." "No. It'll work for "a while" or until the server is restarted. :-)" actually do persist after restarts ... that's what confused me, they wouldn't go away and they should!! regards Matt Chris McDonough wrote: > > Thanks for the reply, that is really useful. There are a couple of things > > though that still don't add up. Firstly, you say below, as do all the > ZODB > > documents that "Custom" classes can certainly persist, they just need to > mix in > > the "Persistence.Persistent" class as a base class. Well, in my example I > > attached in my first email, my product certainly has > Persistence.Persistent, > > but my second class that I add to this one does not, yet it still > persists. > > There was an email sometime ago on the mailing list that told someone that > this > > was why their product instances disappearing from the ZODB. > > (the ref for the original email is : > http://www.egroups.com/message/zope/44263 > > ... I can't find the reply again.) > > > > You can put instances which do not inherit from Persistence.Persistent in > your database. They just won't "stick". They'll hang around until the > server is restarted or for an undetermined amount of time during normal > operations. > > > So my current understanding would be that any classes you want to add in > do not > > need to derive from Persistence.Persistent, and if it is pickleable then > all > > should be fine if you call on instances of that object within you product. > > No. It'll work for "a while" or until the server is restarted. :-) > > > The next part that worried me came from the "python product tutorial" > > http://www.zope.org/Members/hathawsh/PythonProductTutorial > > > > This stated that the class dictionary self.votes = {} needed to be changed > to > > self._votes = Globals.PersistentMapping() so that updates to it persist. > > Hence my query about dictionaries. > > This was for convenience, I'd imagine. > > > I also noticed your comment about __setstate__ . What is it about this > that is > > dangerous. > > Nothing implicitly dangerous, but it can get confusing if you have multiple > revisions of your product and you use variables caused by __setstate__. > Also, once you add a __setstate__ which modifies the object in-place, > there's a likelihood that it can never go away (you're can never be sure if > all instances have been updated). > > > Recently I built a product out of some python classes I wrapped > > around 4DOM, and since 4DOM documents do not seem to persist(well the > document > > does, but it loses all its children), then I persisted them to the local > file > > system, since I needed to do that anyway for what I was doing. Setstate > seemed > > to work nicely to bring them back, though watching its behaviour I noticed > that > > it was called very often by zope. > > Sure, that works... although at that point you're creating your own object > database. :-) > > > > > Chris McDonough wrote: > > > > > All pickleable Python primitive types (strings, dictionaries, lists, > Nones, > > > integers, floats, longs, etc.) can live in the ZODB. They can persist > just > > > like instances that inherit from the Persistent class. > > > > > > I think you read a little too much in to the fact that you need to > "treat > > > mutable objects immutably" when working with them in the ZODB. This > > > statement doesn't mean that these kinds of objects can't be saved in the > > > ZODB, it just means you need to treat them specially when putting them > in > > > the database. > > > > > > For instance, if you were doing this inside of an external method: > > > > > > def amethod(self): > > >self.mydict = {} > > >self.mydict['a'] = 1 > > > > > > (where self is the persistent object that is usually the external > method's > > > "container") > > > > > > It wouldn't work as you expected. Although you'd see an 'a' in mydict > for a > > > little while in further accesses to it, 'mydict' would eventaully show > up as > > > an empty dictionary on the first access of it after it was expired from > the > > > RAM cache (after it was 'ghosted'), because the last thing that the ZODB > > > "saw" (via the __setattr__ on 'self' and a subsequent transaction) was > you > > > setting a empty dictionary. > > > > > > Persistent objects (like "self" in the above example) are only smart > enough > > > to notice changes to themselves that happen through their __setattr__ > (e.g. > > > self.mydict = {} calls self's __setattr__). Mutating the attribute > 'mydict' > > > above "in-place" (via self.mydict['a'] = 1) does not trigger self's > > > __setattr__, so the ZODB never notices that "mydict" got changed. > > > > > > There
Re: [Zope] Failed upgrade to 2.2.4 - solutions?
On Fri, 8 Dec 2000, Luke Tymowski wrote: > Hello > > > To enable profiling, restart the Zope process with the environment > > variable PROFILE_PUBLISHER defined. The value of this variable should be > > the full system path to a file that will be used to dump a profile report > > when the process restarts or exits. > > PROFILE_PUBLISHER='/home/luke/sw/zopeProfile.txt' > > like so in my z2.py? it didn't do anything. Nope, you need to set a process environment variable on your system, not a python variable in your module. You do this before staring Zope, you can do it in a start script (syntax depends on your shell) you can do it from z2.py with os.eviron: http://www.python.org/doc/current/lib/os-procinfo.html Or you can do something like: bash$: export PROFILE_PUBLISHER=/home/luke/sw/zopeProfile.txt bash$: python z2.py -D or something of the like... > But I can get a python core dump! > > I tried just a basic install, without my Data.fs. Same result. > I tried 2.2.2. Same result. > > Looks like an incompatibility with OpenBSD 2.8 (I was running 2.7 until > 2 weeks ago.) > > Any ideas? C-compiler or Python incompatibility between what is on > OpenBSD 2.8 and Zope? Don't know... > > OpenBSD 2.8 comes with Python 1.6. I removed all traces of Python and > reinstalled 1.52 from the source. It's possible you have library missmatch. -Michel ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] NIST meeting: "Defining Standard, Scriptable Objects forCAD/CAE/CAM/PDM"CAD/CAE/CAM/PDM"
"Defining Standard, Scriptable Objects for CAD/CAE/CAM/PDM" Date: December 13th Time: 10:00 AM - 4:00 PM Location: NIST, Building 225, Room A54 -> for directions and maps to NIST, see: http://www.nist.gov/public_affairs/maps/nistmaps.html * If you plan to come, you MUST contact Michael McLay, so that we are sure that the meeting room space is adequate: mailto:[EMAIL PROTECTED] - or call 301-975-4099 Background: Roughly, PDM ("Product Data Management") does for CAD/CAE/CAM models and related objects what Zope does for the objects that need to be managed in a typical Web site (HTML docs, etc.). Problem Statement The problem is to find an open architecture for integrating and managing the configuration of computer-aided design, analysis, and manufacturing (CAD/CAE/CAM) tools, models, and data. The purpose of the meeting is to evaluate technologies, try to define an approximate roadmap for building an open architecture, and establish a ROM guess of (1) how much work may be required to implement the architecture components and (2) the cost of developing and maintaining an instance of the architecture for an engineering organization. Agenda: * Engineering Tool/Data Integration Requirements Steve Waterbury/NASA * GenCAM: a Standard API for Electronic Manufacturing Data Michael McLay/NIST * The MEMS Exchange: Python and ZODB for Management of Complex Objects Andrew Kuchling/CNRI * The CADScript/IScript Architecture (and Demo) Doug Cheney/International TechneGroup, Inc. * Python and Zope: Architectures and Directions Barry Warsaw/Python Labs * Group discussion - How to incorporate interfaces to Python and Zope components such as ZODB into a standard PDM architecture - What enhancements to ZODB, ZCatalog, ZPatterns, etc., can address functionality and interfaces needed for general PDM - Which pieces of the architecture make the most sense as open source products, which ones are most logical as commercial products, and what interfaces should be standardized to enable open source and commercial products to interoperate. Cheers, -- Steve Waterbury NASA/Goddard Space Flight Center. oo _\o \/\ \ / oo _ "Sometimes you're the windshield; sometimes you're the bug." - Knopfler Stephen C. Waterbury Component Technologies Code 562, NASA/GSFC and Radiation Effects Branch Greenbelt, MD 20771 Engineering Web/Database Specialist Tel: 301-286-7557 FAX: 301-286-1695 WWW: http://misspiggy.gsfc.nasa.gov/people/waterbug.html _ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] SECURITY alert and hotfix release
Hi all, Aleksander Salwa has brought a security issue to our attention that affects all Zope versions up to and including Zope 2.2.4. We have released a Hotfix product to address the issue that can be downloaded from zope.org. (Thanks to Aleksander for finding this and to Shane Hathaway for his quick response in resolving it!) The issue involves security registration of "legacy" names for certain object constructors such as the constructors for DTML Method objects. Security was not being applied correctly for the legacy names, making it possible to call those constructors without the permissions that should have been required. This issue could allow anonymous users with enough internal knowledge of Zope to instantiate new DTML Method instances through the Web. The hotfix for this issue is available on the zope.org web site: o http://www.zope.org/Products/Zope/Hotfix_2000-12-08/Hotfix_2000-12-08.tgz We *highly* recommend that any Zope site running versions of Zope up to and including 2.2.4 have this hotfix product installed to mitigate the issue. The hotfix will work for all versions of Zope 2.2.0 and higher. A future version of Zope will contain the fix for this issue, and you will be able to uninstall the hot fix after upgrading. Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] image resize
Check out Zphoto on Zope.org.. http://www.zope.org/Members/Drew/Photo J At 1:42 PM -0600 12/8/2000, Leichtman, David J wrote: >Is there a way to do a dynamic image resize in Zope? I know PHP has that >ability, and I was hoping that Zope had something similar. >And I'm not talking about height and width atributes in the img tag. I mean >actually creating, on-the-fly, a new duplicate of the image that's a >different size. > >___ >Zope maillist - [EMAIL PROTECTED] >http://lists.zope.org/mailman/listinfo/zope >** 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] Zope 2.2.4 dying under Solaris 2.6
I'd like to thank everyone for the suggestions, we do have a C/Python inhouse product that is attached to this Zope. With the suggestions that were mentioned I should be able to confirm if that is the source of the problem fairly shortly. It is currently my number one culprit. I will have to get our developer to look at the code for that soon. -Mike Tres Seaver wrote: > > Michael Best <[EMAIL PROTECTED]> wrote: > > > > I have had Zope 2.0.1, Zope 2.1.6 and Zope 2.2.4 running on Solaris 2.6 > > and inexplicably, every so often (no definiate amount of time) the Zope > > dies. > > > > Any ideas? > > > > -- > > A typical entry from STUPID_LOG is: > > 2000-12-07T18:23:22 ERROR(200) zdaemon zdaemon: Thu Dec 7 11:23:22 > > 2000: Aiieee! 17564 exited with error code: 11 > > -- > > Error code 11 is almost certainly a SEGFAULT, which would typically > mean a pointer bug in a "C" extension. Can you arrange to get a > core file created, and use xdb/gdb to figure out what code was running > when the bug juice squirted? > > At a higher level, what add-on products are you using with Zope? > > Tres. -- Michael Best Systems Administrator ph 780-413-6397 x230 Emergence By Designfax 780-433-7548 #200, 11209 Jasper Avenue toll 866-860-2666 Edmonton, Alberta, T5K 0L5 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] persistence and dictionaries
Huh. If they do, it's by chance only. I'd be hard-pressed to explain it. Do they inherit from *anything*? - Original Message - From: "Matt" <[EMAIL PROTECTED]> To: "Chris McDonough" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, December 08, 2000 2:30 PM Subject: Re: [Zope] persistence and dictionaries > Chris, this was my original confusion the two places below where you say > > "You can put instances which do not inherit from Persistence.Persistent in > your database. They just won't "stick". They'll hang around until the > server is restarted or for an undetermined amount of time during normal > operations." > > "No. It'll work for "a while" or until the server is restarted. :-)" > > actually do persist after restarts ... that's what confused me, they wouldn't > go away and they should!! > > regards > Matt > > Chris McDonough wrote: > > > > Thanks for the reply, that is really useful. There are a couple of things > > > though that still don't add up. Firstly, you say below, as do all the > > ZODB > > > documents that "Custom" classes can certainly persist, they just need to > > mix in > > > the "Persistence.Persistent" class as a base class. Well, in my example I > > > attached in my first email, my product certainly has > > Persistence.Persistent, > > > but my second class that I add to this one does not, yet it still > > persists. > > > There was an email sometime ago on the mailing list that told someone that > > this > > > was why their product instances disappearing from the ZODB. > > > (the ref for the original email is : > > http://www.egroups.com/message/zope/44263 > > > ... I can't find the reply again.) > > > > > > > You can put instances which do not inherit from Persistence.Persistent in > > your database. They just won't "stick". They'll hang around until the > > server is restarted or for an undetermined amount of time during normal > > operations. > > > > > So my current understanding would be that any classes you want to add in > > do not > > > need to derive from Persistence.Persistent, and if it is pickleable then > > all > > > should be fine if you call on instances of that object within you product. > > > > No. It'll work for "a while" or until the server is restarted. :-) > > > > > The next part that worried me came from the "python product tutorial" > > > http://www.zope.org/Members/hathawsh/PythonProductTutorial > > > > > > This stated that the class dictionary self.votes = {} needed to be changed > > to > > > self._votes = Globals.PersistentMapping() so that updates to it persist. > > > Hence my query about dictionaries. > > > > This was for convenience, I'd imagine. > > > > > I also noticed your comment about __setstate__ . What is it about this > > that is > > > dangerous. > > > > Nothing implicitly dangerous, but it can get confusing if you have multiple > > revisions of your product and you use variables caused by __setstate__. > > Also, once you add a __setstate__ which modifies the object in-place, > > there's a likelihood that it can never go away (you're can never be sure if > > all instances have been updated). > > > > > Recently I built a product out of some python classes I wrapped > > > around 4DOM, and since 4DOM documents do not seem to persist(well the > > document > > > does, but it loses all its children), then I persisted them to the local > > file > > > system, since I needed to do that anyway for what I was doing. Setstate > > seemed > > > to work nicely to bring them back, though watching its behaviour I noticed > > that > > > it was called very often by zope. > > > > Sure, that works... although at that point you're creating your own object > > database. :-) > > > > > > > > Chris McDonough wrote: > > > > > > > All pickleable Python primitive types (strings, dictionaries, lists, > > Nones, > > > > integers, floats, longs, etc.) can live in the ZODB. They can persist > > just > > > > like instances that inherit from the Persistent class. > > > > > > > > I think you read a little too much in to the fact that you need to > > "treat > > > > mutable objects immutably" when working with them in the ZODB. This > > > > statement doesn't mean that these kinds of objects can't be saved in the > > > > ZODB, it just means you need to treat them specially when putting them > > in > > > > the database. > > > > > > > > For instance, if you were doing this inside of an external method: > > > > > > > > def amethod(self): > > > >self.mydict = {} > > > >self.mydict['a'] = 1 > > > > > > > > (where self is the persistent object that is usually the external > > method's > > > > "container") > > > > > > > > It wouldn't work as you expected. Although you'd see an 'a' in mydict > > for a > > > > little while in further accesses to it, 'mydict' would eventaully show > > up as > > > > an empty dictionary on the first access of it after it was expired from > > the > > > > RAM cache (after it was 'ghosted'), because the last thing
Re: [Zope] security - am I going crazy ?
On Fri, 8 Dec 2000, Shane Hathaway wrote: > You're right. It's because of a "legacy" issue. Here's a quick patch > that plugs the hole: > [...] > > This is not perfect, however. I'm working on a better solution. Thanks a lot ! It works for me. [EMAIL PROTECTED] /--\ | `long long long' is too long for GCC | \--/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] ZPatterns
[EMAIL PROTECTED] said: > >Hmm, maybe it's the time for a translate-zPatterns-to-english effort? > I'll give it a try: Thanks for the effort, but I'm an application server architect myself so I do understand the things that zPatterns tries to solve. It's not about understanding, my issue with zPatterns is that for every thing in the whole product, a new name has been made up. It sounds extremely interesting of course, and one could probably get a lot of VC capital out of it ;), but for daily work it's just too cumbersome. So what I'd like is that a "Rack" is called a "StorageContainer" (or whatever), a "Skin" might better be called an "Aspect", etcetera. As far as I can see, there's nothing really new in terms of "computer science new" in zPatterns, so it should be possible to find plain terms for all the various components. Until then, I think I'll stay away from it - rather have a more basic application that I can understand than something I need a dictionary for to translate. I rather build quality software than be hip, but then I'm quickly getting to be an old hat in this business... -- Cees de Groot http://www.cdegroot.com <[EMAIL PROTECTED]> GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] ZPatterns
[EMAIL PROTECTED] said: > The basic problem as I experience it is not so much the jargon, > because you get used to it. That's what they told me about Perl, too. And because I couldn't get used to that mess, I switched to Python (maybe zPatterns was written for the wrong language? ;-}) -- Cees de Groot http://www.cdegroot.com <[EMAIL PROTECTED]> GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Another Zope E-Commerce Site Online
[EMAIL PROTECTED] said: > [ an awful lot on the workings of his ecommerce site ] Thanks, Brad. A lot of very useful information, and it'll surely help me in building version 2 of our stuff (v1 was a quick 1.5wk hack because of deadlines, I can now take things "easy", like in 1.75wks :-)). -- Cees de Groot http://www.cdegroot.com <[EMAIL PROTECTED]> GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] strange ZClass method problem
Hello, * I have 2 Folders (Yihaw ZClass instances) * both folders have News objects (cataloged) I put the news on the front page via (this is taken from Yihaw, simplified for the demonstation, but still have the problem) this code - Problem is that some news items are OK and some raise an exeption on told to be missing (!!??) It puzzle me because all news items are same ZClass instance and can be accesed normally via the zope interface, or directly, works well on view etc ... An other strange thing is when i supress the option, an authentication windows show up and gives an other traceback (see below). So when i put the option, to the it works well except nothing shows on the , and the right is correctly shown for ALL the news item (including the b"bad" ones. In the context of both Yihaw Folder i have access content, view authorisation and view (via a local role). Only difference is : * in the folder with problem access content, view authorisation, view are given by hand at this level (without permission acquisition for those 3 for anonymous restriction) * in the folder without problem it's acquired from above (no anonymoiyus restriction) It happens even when i'm "manager". So i suspect some strange security problem, or more sure something i didn't understood on the acquisition/security machinery. And I'm not sure if it has relation with the fact those items are custom ZClass instances I hope this was clear and not too cryptic. The 2 traceback : 1- WITHOUT html_quote Unauthorized You are not authorized to access title_or_id. Traceback (innermost last): File /zope/2-2-2/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /zope/2-2-2/lib/python/ZPublisher/Publish.py, line 187, in publish File /zope/2-2-2/lib/python/ZPublisher/Publish.py, line 171, in publish File /zope/2-2-2/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: yihaw_test1) File /zope/2-2-2/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: yihaw_test1) File /zope/2-2-2/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: yihaw_test1) File /zope/2-2-2/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: yihaw_test1) File /zope/2-2-2/lib/python/DocumentTemplate/DT_In.py, line 611, in renderwb (Object: Catalog(meta_type='Yihaw News Item', sort_on='bobobase_modification_time', sort_order='reverse')) File /zope/2-2-2/lib/python/DocumentTemplate/DT_With.py, line 146, in render (Object: Catalog.getobject(data_record_id_)) File /zope/2-2-2/lib/python/OFS/DTMLMethod.py, line 194, in validate (Object: yihaw_test1) File /zope/2-2- 2/lib/python/AccessControl/SecurityManager.py, line 139, in validate File /zope/2-2- 2/lib/python/AccessControl/ZopeSecurityPolicy.py, line 209, in validate Unauthorized: (see above) 2 - WITH html_quote KeyError Sorry, a Zope error occurred. Traceback (innermost last): File /zope/2-2-2/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /zope/2-2-2/lib/python/ZPublisher/Publish.py, line 187, in publish File /zope/2-2-2/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File /zope/2-2-2/lib/python/ZPublisher/Publish.py, line 171, in publish File /zope/2-2-2/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: yihaw_test1) File /zope/2-2-2/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: yihaw_test1) File /zope/2-2-2/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: yihaw_test1) File /zope/2-2-2/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: yihaw_test1) File /zope/2-2-2/lib/python/DocumentTemplate/DT_In.py, line 611, in renderwb (Object: Catalog(meta_type='Yihaw News Item', sort_on='bobobase_modification_time', sort_order='reverse')) File /zope/2-2-2/lib/python/DocumentTemplate/DT_With.py, line 146, in render (Object: Catalog.getobject(data_record_id_)) File /zope/2-2-2/lib/python/DocumentTemplate/DT_Var.py, line 276, in render (Object: title_or_id) KeyError: title_or_id -- Didier Georgieff DDAF du Bas-Rhin - Cellule SIG 2, rue des Mineurs 67070 Strasbourg Cedex tél : 03.88.25.20.33 - fax : 03.88.25.20.01 email : [EMAIL PROTECTED] SIT du Bas-Rhin : http://www.bas-rhin.sit.gouv.fr GéoWeb http://sertit10.u-strasbg.fr ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] acl_users glitch?
Anthony Monta wrote: > > Is anyone else running into this problem with 2.2.4? I've created a role > called "Faculty" that has all the powers of "Manager" except "Change > Permissions." However, when a user with this role tries to open an > acl_users folder (say, in a subfolder) while using the management screen, > there's a long delay... and then a message appears saying "There are no > transactions that can be undone." What could be the problem? 1) You have a lot of old transactions. Zope scans through all transactions, looking for something that can be undone from the given context. If there aren't any, it will end up scanning the entire database. 2) The user is not allowed (because of security settings) to access the other tabs normally available, so Zope shows you the first available tab: undo. This is not specific to 2.2.4. Does this user have the correct permissions *in the context of the user folder*? Shane ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] strange ZClass method problem
Didier Georgieff wrote: > > Hello, > > * I have 2 Folders (Yihaw ZClass instances) > * both folders have News objects (cataloged) > > I put the news on the front page via (this is taken from Yihaw, simplified for the > demonstation, but still have the problem) this code > >meta_type='Yihaw News Item', > sort_on='bobobase_modification_time', > sort_order='reverse')" size=30 start=query_start> > > > - > > > > > > Problem is that some news items are OK and some raise an exeption on title_or_id> told to be missing (!!??) > > It puzzle me because all news items are same ZClass instance and can be accesed > normally via the zope interface, or directly, works well on view etc ... Did you index title_or_id in the catalog? When you do a search on a catalog, you only have the variables that you indexed available, as you are working out of the catalog, not the actual object. Bill ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] image resize
Is there a way to do a dynamic image resize in Zope? I know PHP has that ability, and I was hoping that Zope had something similar. And I'm not talking about height and width atributes in the img tag. I mean actually creating, on-the-fly, a new duplicate of the image that's a different size. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Adding users to acl_users
Hi everyone, I tried to add the manage_users thing that someone referred me to (sorry that I don't remember who) and got the following error: Error Type: KeyErrorError Value: __cmp__ my code is as follows: User Name: Password:Confirm Password: Role: Manager Owner User -END- to get the information and I'm using the code: to process it. I've taken the code pretty much directly from the acl_users folder's Add form... Anyone know what's going on? Thanks again for everyone's help. The _.str(date) thing worked perfectly with my Access date problem... Mike Kelland [EMAIL PROTECTED]
Re: [Zope] Failed upgrade to 2.2.4 - solutions?
On Fri, 8 Dec 2000, Luke Tymowski wrote: > Hello, > > I've just tried and failed to upgrade to 2.2.4 from 2.2.2. A python > instance starts up and slowly swallows the CPU, ending with 99% of the > CPU. A second python instance starts and doesn't do anything naughty. > > If I issue a ./stop, the second python instance ends properly, but the > first continues to consume all CPU resources. > > I've tried recompiling it several times, reinstalling Python, but no go. > It did once start up properly, but as soon as I tried logging into Zope, > python took over the CPU. > > I'm using OpenBSD 2.8, python 1.5.2, x86, 196MB of RAM, GBs of free disk > space. > > I've been using Zope since 2.0 and have never had this much trouble > upgrading. the only Zope product I'm using is SiteAccess (the same > setup as the old Zope.org before the cluster upgrade). > > Any ideas? Try turning on the profiler. Quothe the control panel: To enable profiling, restart the Zope process with the environment variable PROFILE_PUBLISHER defined. The value of this variable should be the full system path to a file that will be used to dump a profile report when the process restarts or exits. And kill the process. Maybe this will create a profile report that tells you where it's spinning. Are you sure your waiting long enough? If you have a large Data.fs and you just move it over to a new install, Zope needs to take some time to build the initial database index file. -Michel ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Failed upgrade to 2.2.4 - solutions?
Hello, I've just tried and failed to upgrade to 2.2.4 from 2.2.2. A python instance starts up and slowly swallows the CPU, ending with 99% of the CPU. A second python instance starts and doesn't do anything naughty. If I issue a ./stop, the second python instance ends properly, but the first continues to consume all CPU resources. I've tried recompiling it several times, reinstalling Python, but no go. It did once start up properly, but as soon as I tried logging into Zope, python took over the CPU. I'm using OpenBSD 2.8, python 1.5.2, x86, 196MB of RAM, GBs of free disk space. I've been using Zope since 2.0 and have never had this much trouble upgrading. the only Zope product I'm using is SiteAccess (the same setup as the old Zope.org before the cluster upgrade). Any ideas? thanks, Luke ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] security - am I going crazy ?
Aleksander Salwa wrote: > Few days ago I found that on site that I'm currently working on, > everybody can add DTMLMethods and Documents (and maybe do more, I haven't > checked yet, but I think it's bad enough !) by simply entering URL > http://www.mysite.com/manage_addDTMLMethod?id=q1&title=qq1&file=qqq1 You're right. It's because of a "legacy" issue. Here's a quick patch that plugs the hole: Index: ProductContext.py === RCS file: /cvs-repository/Zope2/lib/python/App/ProductContext.py,v retrieving revision 1.27 diff -u -r1.27 ProductContext.py --- ProductContext.py 2000/11/20 15:36:35 1.27 +++ ProductContext.py 2000/12/08 18:46:38 @@ -195,7 +195,7 @@ else: name=method.__name__ if not OM.__dict__.has_key(name): setattr(OM, name, method) -setattr(OM, name+'__roles__', pr) +setattr(OM, method.__name__+'__roles__', pr) if type(initial) is tt: name, initial = initial else: name=initial.__name__ This is not perfect, however. I'm working on a better solution. Shane ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] security - am I going crazy ?
Few days ago I found that on site that I'm currently working on, everybody can add DTMLMethods and Documents (and maybe do more, I haven't checked yet, but I think it's bad enough !) by simply entering URL http://www.mysite.com/manage_addDTMLMethod?id=q1&title=qq1&file=qqq1 After that Zope sends 'Location' header to redirect user to 'manage_main'. That (manage_main) causes 'Unauthorized' exception. But that object 'q1' was added !!! I was thinking that it's a bug in Product. (I use LoginManager, LocalFS, SiteAccess). I decided to upgrade my Zope from 2.2.1 to 2.2.4 and upgrade all Products (one good thing so far ;)). No success. So I did fresh install of Zope 2.2.4, without additional Products, with with brand new Data.fs. Problem persists ! I have default security settings, so Anonymous can't "Add Documents, Images, and Files". Of course user can put any DTML in this object - you know the consequences... (and if the folder where this object is located is owned by high-privileged user, then this object is owned by that user too (through acquisition)). I just checked: I can't add Folders this way. What's going on ?!? Have I found very big security hole, or just I'm going crazy ? :( P.S. Just take a look at object with id "haveIFoundABug" in root level of www.zope.org that I created few seconds ago... [EMAIL PROTECTED] /--\ | `long long long' is too long for GCC | \--/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] acl_users glitch?
Is anyone else running into this problem with 2.2.4? I've created a role called "Faculty" that has all the powers of "Manager" except "Change Permissions." However, when a user with this role tries to open an acl_users folder (say, in a subfolder) while using the management screen, there's a long delay... and then a message appears saying "There are no transactions that can be undone." What could be the problem? Cheers, Anthony Dr. A. B. Monta Coordinator of Curricular Assessment & Academic Reporting Louisiana Board of Regents 150 Third Street, Suite 129 Baton Rouge, LA 70801-1389 225.342.4253, ext. 143 [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] Why I Love Zope: Success Stories (BEWARE: sappy stuffinside)
-Original Message- From: J. Atwood <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Friday, December 08, 2000 10:35 PM Subject: [Zope] Why I Love Zope: Success Stories (BEWARE: sappy stuff inside) >I run at least 7 or 8 Zope sites of varying shapes and sizes for >about a year now and everyone once in awhile I just have to take a >moment and reflect upon how much easier Zope has made my "web" life. ---8<---snipped a lot of great stuff. search the mailing list if you want to know :)--- oOo Zope .. how do i love thee.. let me count the ways -i can now give something out, instead of sucking everything in. the community is really a helpful lot. if i don't chance upon zope (twice - once during 1.1.13 i left screaming for not able to run it, then 2.0b1 - i left screaming for being able to put up a site in a month), i will still be the head who'll use your code and don't give anything in return :) -zclass - despite what Chrisw, TheJester, and all you real developers out there say :), is really a hook in mouth. without it i won't procede, and without it, i wont try to learn python. -i'll stop now until i can't count higher then 2, or get that free zope book :) what say others? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] DTML-LET problems
Mohan try this, -AndyD > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mohan > Baro > Sent: 08 December 2000 14:41 > To: [EMAIL PROTECTED] > Subject: [Zope] DTML-LET problems > > > Why doesn't the following code work? > How do I achieve the desired functionality? > > > "> > > > > Mohan. > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** 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] DTML-LET problems
Why doesn't the following code work? How do I achieve the desired functionality? "> Mohan. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] DTML-LET problems
Thanks Ivan & Peter, It work!. Mohan. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ivan Cornell Sent: Friday, December 08, 2000 10:25 AM To: Mohan Baro Cc: [EMAIL PROTECTED] Subject: Re: [Zope] DTML-LET problems Mohan Baro wrote: > Why doesn't the following code work? > How do I achieve the desired functionality? > > "> > > > > Mohan. You can't embed dtml within dtml. Try: Ivan PS, I would have replied to your previous post if it hadn't been in HTML! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Is it Possible 2: Get resolution!
Oleg Broytmann wrote: > > On Fri, 8 Dec 2000, Stoonsdesign wrote: > > Q: Is it posible to get the current users SCREEN-RESOLUTION (without > > using Javascript!)..? > >You can't, and you don't need. Even if you get the resolution, you'd > have hard times generating HTML for that resolution: HTML is very bad > concerning strict screen positioninig. HTML is not "publishing". I can imagine webpage which uses some Javascript to append information about resolution to the request as some parameter. Then you could use it, but it does not make too much sense. What if some people use your page through caching proxy, which serves it to a few guys without refetching it (yes, you can forbid caching). What if someone dynamically changes resolution (as I do with Ctrl-Alt-+ working on my XWindows Linux)? What if the client disables JavaScript? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Why I Love Zope: Success Stories (BEWARE: sappy stuff inside) (you're not alone)
Well done J. I've almost been struggling to convince my tech. dir. about Zope. By now I've almost given up, and I just say. "Zope is better. That's it. Take it or leave it." I was asked to build a intranet site for my company. I installed a Squishdot and changed the logo in the top lefthand corner. Don't give up. After xmas I will have recharged batteries for my propaganda so, I won't give up. cheers, Peter - Original Message - From: "J. Atwood" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 08, 2000 2:20 PM Subject: [Zope] Why I Love Zope: Success Stories (BEWARE: sappy stuff inside) > I run at least 7 or 8 Zope sites of varying shapes and sizes for > about a year now and everyone once in awhile I just have to take a > moment and reflect upon how much easier Zope has made my "web" life. > There are some of my stories (que the music) > > > - Recently someone took notice of a FAQ on one of my sites (thank you > KnowledgeKit) and was trying to figure out how I kept it updated and > allowed for user submissions. As I told them about the process > (submit, email, edit, approve, go live and added to "new FAQs") I > just realized how cool the system really is and how much easier it > had all been to do in Zope. The kicker was when I mentioned I had the > same system for the links (Thank you SimpleURL). They were stunned, > to say the least. Go Zope. > > - My Brother recently had a child and not only was I able to set my > new niece up with a area on the family site but gave my Father a > username and password and about five minutes of instructions on how > to get images into the photo album (thank you ZPhotoAlbum). I went to > bed while he scanned away and published a series of pictures all by > himself. Not only was he totally impressed with the system but in the > content management features. Of course a link went out to all the > family to come and take a look. Zope can now add a new tag line > "Father Friendly." > > - I have been slowly getting Zope into more and more projects at > work. We are now at about 5 Zope sites. This really shouldn't seem > that amazing except for the fact that I in order to build the very > first site in Zope I had to battle for about two weeks with > arguments, case studies and ultimately putting my job on the line. > Now, when building a new site they don't even question what I will > build it in. Zope is CEO friendly as well. > > - Two of our sites at work were built at the same time. One in Zope > one in JSP. Everyone worried about the Zope and how it compared to > JSP (Tomcat). Fast forward a few months when the consultants who > built the JSP site are gone and the two sites need content management > and updating. I spent a little time with one user teaching them how > to update some stuff with versions etc and they have been happily > doing so ever since. The person who is responsible for keeping the > JSP site updated has been struggling with code, FTP issues, compiling > problems, etc. After about a month of struggling with her updates and > changes she noticed the other user easily go in through his browser, > do a quick change and make it go live. Fireworks erupted. She had a > TIZZY! "DID YOU JUST CHANGE THE HOMEPAGE THAT EASILY? HOW CAN YOU DO > THAT? WHY CAN'T I DO THAT?! OH MY GOD!!" To which he simply replied, > "I don't know... I think it is cause it is Zope" (not really knowing > what Zope was at all). > > (last one) > > - We were building a new brochure site (simple, graphic, etc) and the > graphic artist who knows a bit of HTML but mostly works in > DreamWeaver and has done a few Zope updates and image uploads in Zope > before is heading the project. I set up a Zope server for him, gave > him a username and password and basically went on to another project. > A few weeks go by and I went to check to see how things had been > going thinking that he would probably need me to get the data up > there and start building the site in Zope. Not only was the site > already built with DTML navigation that he had put in for location > specific buttons but he was working on the second version of the > entire site in a version. I was totally stunned. > > Just a nice set of stories for you to share with your peers when they > ask you why you should/would or do use Zope. > > If anyone else has similar stories it would be nice to hear them. > > Cheers, > J > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-
Re: [Zope] ZEXP filesize
peter bengtson wrote: > > How (and if) is it possible to deduce the total size of a website from the > filesize of Exported ZEXP files in Zope? > If it's not possible to find a formula for the ratio of zopestuff and > htmlstuff, is there any other way of getting a good estimate of "how big a > site is"? The size of a ZEXP should be a pretty good estimate. Its structure is quite similar to the object database. The differences are the lack of history, versions, and database index information in the ZEXP. However, it would also be possible to write an external method which computes directly the size of all pickles in a branch. In fact, here's a start: def compute_size(self): oid = self._p_oid jar = self._p_jar p, serial = jar._storage.load(oid, jar._version) size = len(p) for subob in self.objectValues(): size = size + compute_size(subob) return size It won't work at the root of a site, but it will work most other places. Shane ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] DTML-LET problems
Mohan Baro wrote: > Why doesn't the following code work? > How do I achieve the desired functionality? > > "> > > > > Mohan. You can't embed dtml within dtml. Try: Ivan PS, I would have replied to your previous post if it hadn't been in HTML! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Why I Love Zope
> > If anyone else has similar stories it would be nice to hear them. > Well, I've only been using Zope for 6 weeks now, & I've already launched one site based totally on it in my spare time: http://www.noonsite.com , a site for cruising sailors. Early days for it, but I've already got my father & sister inputting all the information via the web in different countries, using versions not to break the live site, etc. I've forgotten how many times zope's blown me away, having spent my first week fighting acquisition & the usual newbie things, I now find I can answer about 50% of questions on this list - a very steep learning curve (ie going from zero to zen quickly!). Now I've just got to get to grips with it at work - I'm currently working on converting a 500,000 row postgresql/php media database over using ZPatterns... Regards, Ivan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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! - DTML Variables
You can't have DTML inside DTML. The cheers, peter - Original Message - From: Mohan Baro To: [EMAIL PROTECTED] Sent: Friday, December 08, 2000 1:53 PM Subject: [Zope] HELP! - DTML Variables In the code segment : How do I declare a variable such as intEmployee='123456' so that I can use it as: What I am really tring to do is: ')" size=50 start=query_start> But I keep on getting syntax errors. Mohan. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Microsoft IIS 4.0 and Zope
The easiest thing to do (for me now) is to add Apache as front-end web-server for both IIS and Zope. The access to documentation, well tested and documented rules for rewriting, lots of HOW-TO's, mailing lists etc makes this a good choice - open source rules! Any comments on running Apache as front-end for IIS 4.0 and Zope? I would gladly throw out the IIS server, but my customers has software that relies on this server. Best regards Petter Enholm - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, December 08, 2000 4:05 PM Subject: RE: [Zope] Microsoft IIS 4.0 and Zope > Hi Petter, > > I have the same problem. Could you tell me if you find a way? I > hope someone on this list have an answer! > > > > -Message d'origine- > De : Petter Enholm [mailto:[EMAIL PROTECTED]] > Envoyé : vendredi 8 décembre 2000 07:53 > À : [EMAIL PROTECTED] > Objet : [Zope] Microsoft IIS 4.0 and Zope > > > Hi, > > This may be more of a Microsoft IIS questions than Zope question, but I give > it a shot! > > I have installed Zope (on port 8080) on a Windows NT 4.0 server with IIS > 4.0, followed to Howto that explains how to set up PCGI with IIS, and all > works very well. I can access Zope through > http://localhost/scripts/zope.pcgi > > Next step: I want to access the Zope site through a given DNS name, f eks > www.mydomain.com. How can I do this with IIS 4.0? I find no way to redirect > a virtual host and at the same time rewrite the URL so that the user gets > http://www.mydomain.com in the browser, not .../scripts/zope.pcgi. > > Anybody out there with knowledge on this issue? > > Best regards > > Petter Enholm > Snapper as > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** 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] Microsoft IIS 4.0 and Zope
Hi Petter, I have the same problem. Could you tell me if you find a way? I hope someone on this list have an answer! -Message d'origine- De : Petter Enholm [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 8 décembre 2000 07:53 À : [EMAIL PROTECTED] Objet : [Zope] Microsoft IIS 4.0 and Zope Hi, This may be more of a Microsoft IIS questions than Zope question, but I give it a shot! I have installed Zope (on port 8080) on a Windows NT 4.0 server with IIS 4.0, followed to Howto that explains how to set up PCGI with IIS, and all works very well. I can access Zope through http://localhost/scripts/zope.pcgi Next step: I want to access the Zope site through a given DNS name, f eks www.mydomain.com. How can I do this with IIS 4.0? I find no way to redirect a virtual host and at the same time rewrite the URL so that the user gets http://www.mydomain.com in the browser, not .../scripts/zope.pcgi. Anybody out there with knowledge on this issue? Best regards Petter Enholm Snapper as ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Why I Love Zope: Success Stories (BEWARE: sappy stuff inside)
I run at least 7 or 8 Zope sites of varying shapes and sizes for about a year now and everyone once in awhile I just have to take a moment and reflect upon how much easier Zope has made my "web" life. There are some of my stories (que the music) - Recently someone took notice of a FAQ on one of my sites (thank you KnowledgeKit) and was trying to figure out how I kept it updated and allowed for user submissions. As I told them about the process (submit, email, edit, approve, go live and added to "new FAQs") I just realized how cool the system really is and how much easier it had all been to do in Zope. The kicker was when I mentioned I had the same system for the links (Thank you SimpleURL). They were stunned, to say the least. Go Zope. - My Brother recently had a child and not only was I able to set my new niece up with a area on the family site but gave my Father a username and password and about five minutes of instructions on how to get images into the photo album (thank you ZPhotoAlbum). I went to bed while he scanned away and published a series of pictures all by himself. Not only was he totally impressed with the system but in the content management features. Of course a link went out to all the family to come and take a look. Zope can now add a new tag line "Father Friendly." - I have been slowly getting Zope into more and more projects at work. We are now at about 5 Zope sites. This really shouldn't seem that amazing except for the fact that I in order to build the very first site in Zope I had to battle for about two weeks with arguments, case studies and ultimately putting my job on the line. Now, when building a new site they don't even question what I will build it in. Zope is CEO friendly as well. - Two of our sites at work were built at the same time. One in Zope one in JSP. Everyone worried about the Zope and how it compared to JSP (Tomcat). Fast forward a few months when the consultants who built the JSP site are gone and the two sites need content management and updating. I spent a little time with one user teaching them how to update some stuff with versions etc and they have been happily doing so ever since. The person who is responsible for keeping the JSP site updated has been struggling with code, FTP issues, compiling problems, etc. After about a month of struggling with her updates and changes she noticed the other user easily go in through his browser, do a quick change and make it go live. Fireworks erupted. She had a TIZZY! "DID YOU JUST CHANGE THE HOMEPAGE THAT EASILY? HOW CAN YOU DO THAT? WHY CAN'T I DO THAT?! OH MY GOD!!" To which he simply replied, "I don't know... I think it is cause it is Zope" (not really knowing what Zope was at all). (last one) - We were building a new brochure site (simple, graphic, etc) and the graphic artist who knows a bit of HTML but mostly works in DreamWeaver and has done a few Zope updates and image uploads in Zope before is heading the project. I set up a Zope server for him, gave him a username and password and basically went on to another project. A few weeks go by and I went to check to see how things had been going thinking that he would probably need me to get the data up there and start building the site in Zope. Not only was the site already built with DTML navigation that he had put in for location specific buttons but he was working on the second version of the entire site in a version. I was totally stunned. Just a nice set of stories for you to share with your peers when they ask you why you should/would or do use Zope. If anyone else has similar stories it would be nice to hear them. Cheers, J ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Another Zope E-Commerce Site Online
On 8 Dec 2000, at 8:14, Cees de Groot wrote: > >The nice thing about the checkout sequence is that you can move > >backwards at any time without losing the entered data. Also you can > >jump out to shop more, jump to the privacy, shipping and returns policy > >and your entered data isn't lost. > > > As my ebusiness site has trouble with exactly that point, would you care to > elaborate on how you accomplished that? It'd be nice to peek at someone > else's solution before running off and reinventing wheels :-) When users proceed from Shopping Cart to Checkout, we create an SQL record for the order. This record holds their billing and shipping information, charge card result code (not the credit card number of course). If you examine the checkout sequence, you'll see that the only way you can leave it (other than by the nav bar, which will soon be fixed too) is by clicking on an image. All of these images are part of the form. Clicking on any image causes the contents of the form to populate the database record. If you clicked on 'next', we also validate your inputs. If your input passes validation, we increment a "nextPageAllowed" SQLSession integer. This controls which page you can move to.. So naturally you can move backwards to any page you've completed, we retrieve the data from the SQL record to populate the form. When you hit page 3, we populate a LINEITEMS table by dumping the contents of your shopping cart (which is an SQLSession dict). During the population of LINEITEMS, we calculate sales tax, shipping costs, etc and record all the costs in the ORDER record. We then display on step 3 the LINEITEMS records and the costs from the ORDER record, since this is what the actual cc charge will be based on. Brad Clements,[EMAIL PROTECTED] (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] does not work!
this is what I use to get the current time. Mohan. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Thomas Volkmar Worm Sent: Friday, December 08, 2000 4:42 AM To: [EMAIL PROTECTED] Subject: [Zope] does not work! Hi, trying the example from the DTML-Documentation, page 3, leads to the following result when viewing the page. Why? I am using Zope 2.2.4. I get the same results on W98/WNT and Linux. Without this tag, the page works. Regards Thomas {PRIVATE}{PRIVATE "TYPE=PICT;ALT=Zope"} Zope Error Zope has encountered an error while publishing this resource. Error Type: KeyError Error Value: date Troubleshooting Suggestions Thisresource may be trying to reference a nonexistent object or variable date. The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. {HYPERLINK "http://www.zope.org/Credits"}{PRIVATE "TYPE=PICT;ALT=Powered by Zope"}{HYPERLINK "http://www.zope.org/Credits"} Traceback (innermost last): File D:\Programme\Zope\lib\python\ZPublisher\Publish.py , line 222, in publish_module File D:\Programme\Zope\lib\python\ZPublisher\Publish.py , line 187, in publish File D:\Programme\Zope\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File D:\Programme\Zope\lib\python\ZPublisher\Publish.py , line 171, in publish File D:\Programme\Zope\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: test) File D:\Programme\Zope\lib\python\ZPublisher\Publish.py , line 112, in call_object (Object: test) File D:\Programme\Zope\lib\python\OFS\DTMLDocument.py, line 177, in __call__ (Object: test) File D:\Programme\Zope\lib\python\DocumentTemplate\DT_S tring.py, line 528, in __call__ (Object: test) File D:\Programme\Zope\lib\python\DocumentTemplate\DT_V ar.py, line 276, in render (Object: date) KeyError: (see above) Thomas Volkmar Worm Diagonalstr. 25 D-20537 Hamburg Tel.: +49 40 2198 2741 Fax.: +49 40 2198 2742 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Is it Possible 2: Get resolution!
On Fri, 8 Dec 2000, Stoonsdesign wrote: > Q: Is it posible to get the current users SCREEN-RESOLUTION (without > using Javascript!)..? You can't, and you don't need. Even if you get the resolution, you'd have hard times generating HTML for that resolution: HTML is very bad concerning strict screen positioninig. HTML is not "publishing". Oleg. Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] persistence and dictionaries
> Thanks for the reply, that is really useful. There are a couple of things > though that still don't add up. Firstly, you say below, as do all the ZODB > documents that "Custom" classes can certainly persist, they just need to mix in > the "Persistence.Persistent" class as a base class. Well, in my example I > attached in my first email, my product certainly has Persistence.Persistent, > but my second class that I add to this one does not, yet it still persists. > There was an email sometime ago on the mailing list that told someone that this > was why their product instances disappearing from the ZODB. > (the ref for the original email is : http://www.egroups.com/message/zope/44263 > ... I can't find the reply again.) > You can put instances which do not inherit from Persistence.Persistent in your database. They just won't "stick". They'll hang around until the server is restarted or for an undetermined amount of time during normal operations. > So my current understanding would be that any classes you want to add in do not > need to derive from Persistence.Persistent, and if it is pickleable then all > should be fine if you call on instances of that object within you product. No. It'll work for "a while" or until the server is restarted. :-) > The next part that worried me came from the "python product tutorial" > http://www.zope.org/Members/hathawsh/PythonProductTutorial > > This stated that the class dictionary self.votes = {} needed to be changed to > self._votes = Globals.PersistentMapping() so that updates to it persist. > Hence my query about dictionaries. This was for convenience, I'd imagine. > I also noticed your comment about __setstate__ . What is it about this that is > dangerous. Nothing implicitly dangerous, but it can get confusing if you have multiple revisions of your product and you use variables caused by __setstate__. Also, once you add a __setstate__ which modifies the object in-place, there's a likelihood that it can never go away (you're can never be sure if all instances have been updated). > Recently I built a product out of some python classes I wrapped > around 4DOM, and since 4DOM documents do not seem to persist(well the document > does, but it loses all its children), then I persisted them to the local file > system, since I needed to do that anyway for what I was doing. Setstate seemed > to work nicely to bring them back, though watching its behaviour I noticed that > it was called very often by zope. Sure, that works... although at that point you're creating your own object database. :-) > > Chris McDonough wrote: > > > All pickleable Python primitive types (strings, dictionaries, lists, Nones, > > integers, floats, longs, etc.) can live in the ZODB. They can persist just > > like instances that inherit from the Persistent class. > > > > I think you read a little too much in to the fact that you need to "treat > > mutable objects immutably" when working with them in the ZODB. This > > statement doesn't mean that these kinds of objects can't be saved in the > > ZODB, it just means you need to treat them specially when putting them in > > the database. > > > > For instance, if you were doing this inside of an external method: > > > > def amethod(self): > >self.mydict = {} > >self.mydict['a'] = 1 > > > > (where self is the persistent object that is usually the external method's > > "container") > > > > It wouldn't work as you expected. Although you'd see an 'a' in mydict for a > > little while in further accesses to it, 'mydict' would eventaully show up as > > an empty dictionary on the first access of it after it was expired from the > > RAM cache (after it was 'ghosted'), because the last thing that the ZODB > > "saw" (via the __setattr__ on 'self' and a subsequent transaction) was you > > setting a empty dictionary. > > > > Persistent objects (like "self" in the above example) are only smart enough > > to notice changes to themselves that happen through their __setattr__ (e.g. > > self.mydict = {} calls self's __setattr__). Mutating the attribute 'mydict' > > above "in-place" (via self.mydict['a'] = 1) does not trigger self's > > __setattr__, so the ZODB never notices that "mydict" got changed. > > > > There are two ways to handle this. The first is to treat mutable attributes > > "immutably" via assigning to a temporary variable and then making sure the > > persistent container's __setattr__ gets called: > > > > def amethod(self): > >dict = {} > >dict['a'] = 1 > >self.mydict = dict # trigger persistence mechanism implicitly > > > > The second is to use the _p_changed attribute of the persistent object on > > which the primitive is set. This explcitly tells the persistence system to > > include the object on which it's set into the current transaction: > > > > def amethod(self): > >self.mydict = {} > >self.mydict['a'] = 1 > >self._p_changed = 1 # trigger persistence mechanism manually > > > > Variations on thi
[Zope] Re: sorry to bother you again
- Original Message - From: "Matt" <[EMAIL PROTECTED]> To: "Chris McDonough" <[EMAIL PROTECTED]> Sent: Friday, December 08, 2000 4:46 AM Subject: sorry to bother you again No problem... I'd like to keep it on the mail list, so other folks can get the benefit. > Chris, > I found the following in the mailing lists, it was one of your replies to a > persistence question, I think it could finally clarify some things for me. > > Now if I understand what you have been saying in the following and before then > if I used self.a[0] = b then this will only be committed if I had called the > function that calls this within my product. If I called the function outside > of this, say using a dtmlMethod or an external method, then it would not > persist and instead I should really use > > tmp = self.a > tmp[0] = b > self.a = tmp The main question to ask yourself when trying to persist things is "is the __setattr__ of a persistent object getting called"? In the above example, the answer is yes. > I feel I am missing something. The boringplus product I made uses self.a[0] = > b type referencing, but on a dictionary, and works well. Where would my > product fail? It would not show your mutations of the 'self.a' dictionary: - after the server is stopped and restarted -or- - after the object referenced by 'self' was flushed from the RAM cache during normal operations > > thanks for your help > regards > Matt > > > Message 29479 of 46695 > >[ Reply ] > [ Forward ] >[ View > Source ] > > > > > From: Chris McDonough <[EMAIL PROTECTED]> > Date: Tue May 2, 2000 3:05am > Subject: Re: [Zope-dev] Zope/Python Object Persistence > > > Chimezie is right... one clarification: you don't necessarily > need to > make the counter an attribute of the object the getNextCount() > method is > implemented on, but it needs to be an attribute of some object > that > sublclasses Persistence.Persistent (any standard Zope object). > > Note also that you will undoubtedly be bitten at some point > during the > writing of code in Zope by the somewhat unobvious fact that you > need to > treat mutable Python objects that are attributes of persistent > objects > as immutable. So instead of (for example): > > self.a[0] = b > > You'd need to do something like: > > tmp = self.a > tmp[0] = b > self.a = tmp > > Doing this triggers the persistence machinery. A different, > short-hand > way to do this is: > > self.a[0] = b > self.a._p_changed=1 > > > Chimezie Thomas-Ogbuji wrote: > > > > If you make the dictionary an attribute of the zope object > the > > getNextCount() method is called on, it should be pickled > automatically > > by ZODB. You'll need this logic in the beggining of > getNextCount: > > > > if (attribute exists): > > increment count attribute > > else: > > set attribute to default value (0) and increment > > > > This solution assumes you want a per-object persistent > counter. If what > > you want is a class-wide counter (common to all instances) > then I'm not > > sure how you'd do this besides: > > 1) using ZPickle product (might be overkill) > > 2) using Persistent List product (might be more appropriate) > > > > > Adam Pawliuk wrote: > > > > > > Hi, > > > > > > Is there a way that I can maintain persistent python > objects in > > > memory through the Zope Server? > > > > > > As a simple example if I create a counter in a python > module and > > > access it through an external method, the module seems to > get reloaded > > > every so often, so the counter will get reset. Can I avoid > this? > > > Basically I just want to keep a persistent > hashtable/Dictionary. > > > > > > MODULE: > > > > * > > > __persist = {}; > > > __persist['count'] = 0; > > > > > > def getNextCount(): > > >__persist['count'] = int( __p
[Zope] HELP! - DTML Variables
In the code segment : How do I declare a variable such as intEmployee='123456' so that I can use it as: What I am really tring to do is: ')" size=50 start=query_start> But I keep on getting syntax errors. Mohan.
[Zope] ZEXP filesize
How (and if) is it possible to deduce the total size of a website from the filesize of Exported ZEXP files in Zope? If it's not possible to find a formula for the ratio of zopestuff and htmlstuff, is there any other way of getting a good estimate of "how big a site is"? Cheers, Peter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Is it Possible 2: Get resolution!
Q: Is it posible to get the current users SCREEN-RESOLUTION (without using Javascript!)..? Since Zope is a server-side application, it is completely ignorant to client settings. It can get only variables from the HTTP environment settings. Since Javascript is a client side language, it can get client-specific information. Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development & Technical Project Management
[Zope] Microsoft IIS 4.0 and Zope
Hi, This may be more of a Microsoft IIS questions than Zope question, but I give it a shot! I have installed Zope (on port 8080) on a Windows NT 4.0 server with IIS 4.0, followed to Howto that explains how to set up PCGI with IIS, and all works very well. I can access Zope through http://localhost/scripts/zope.pcgi Next step: I want to access the Zope site through a given DNS name, f eks www.mydomain.com. How can I do this with IIS 4.0? I find no way to redirect a virtual host and at the same time rewrite the URL so that the user gets http://www.mydomain.com in the browser, not .../scripts/zope.pcgi. Anybody out there with knowledge on this issue? Best regards Petter Enholm Snapper as ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] FW: [Zope] FTP for ZClass hierarchies
M. Adam Kendall" <[EMAIL PROTECTED]> wrote: > ARGH.. Spoke too soon.. just figured out how to override it > so it actually WILL let you get to methods of inner Zclasses. > And yes, I have tried to save back to the methods and they > save fine.. The next thing to try to tackle is how to make > FTP create a DTML Method instead of DTML Document as the > default when creating new files. I just checked in a pair of features for 2.3a1 which make it possible to hook the "figure out what kind of thing to create when handling a PUT to a new object" strategy. See the "hookable PUT creation fishbowl proposal", http://dev.zope.org/Wikis/DevSite/Proposals/HookablePUTCreation > Hope this helps. > > > In the past few days I have been working on a patch that will > > let you edit ZClasses via FTP without the need for typing in > > actual pathnames to get to the methods (mainly so I can edit > > ZClasses with HTML-Kit). Strangely enough, even with the > > modifications, I see this same thing. Tres. -- === Tres Seaver[EMAIL PROTECTED] Digital Creations "Zope Dealers" http://www.zope.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Using aquisition inside a dtml method of a product ?
On Fri, 8 Dec 2000, Andreas Jung wrote: > On Thu, Dec 07, 2000 at 10:07:25PM -0500, Tres Seaver wrote: > > > > Could it be that you don't derive your product class (directly or > > indirectly) from Acquisition.Implicit? Otherwise, I'm stumped. > > I use just the code you describe inside the PTK, for instance. > > Yes, that was the problem. I took the ExternalMethod product > as example - this one uses explicit aquisition. Explicit can be helpful in some cases. For instance, you could add these lines to your class to solve the immediate problem without opening it up to acquire anything: standard_html = standard_html_footer = Acquisition.Acquired Tres. -- === Tres Seaver[EMAIL PROTECTED] Digital Creations "Zope Dealers" http://www.zope.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Authentication Problem : External method returning object
>> >> Here is the external method "testexternal": >> >> class AClass: [Dieter Maurer] >You will need (or something like this): > __access_to_unprotected_subobjects__= 1 >> def __init__(self): > > It works a treat. Thanks! Sean ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Is it Possible 2: Get resolution!
Quote: "ASP Sux, Php is OK, but ZOPE RULEZ!" Stoons (me) friday 8th dec. 2000. Q: Is it posible to get the current users SCREEN-RESOLUTION (without using Javascript!)..? Stoons = )
Re: [Zope] New version of book uploaded
(this time after several attempts to reload) Michel Pelletier wrote: > Greetings, > > Read this carefully, you may end up with a free, signed copy of the Zope > book. http://www.zope.org/Members/michel/ZB/AppendixA.html return: Returns data The return tag stops executing DTML and returns data. It mirrors the Python return statement. Syntax return tag syntax: Stops execution of DTML and returns a variable or expression. The DTML output is not returned. Usually a return expression is more useful than a return variable. Python Methods largely obsolete this ^^^ ^^ tag. Jochen -- -- Jochen Knuth WebMaster http://www.ipro.de IPRO GmbH Phone ++49-7152-93330 Steinbeisstr. 6 Fax ++49-7152-933340 71229 LeonbergEMail: [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] ZNavigator
well, i installed navigator_demo.zexp and the ZNavigator folder from 2-00 and 2-01 respectively that i downloaded yesturday didn't help, but solution solution: delete navigator_demo/simple_demo/infobar/nonsens and simple_demo works your selection of objekt names, bar entries and the respective differences does unfortunately not really support bugtracking :-( since the complex_demo does not give any positive sign i give up here i would love to understand the complex_demo too, in case you have the correct version feel free to email it to me. thanks for your help and your product anyway olaf Jonas Juselius schrieb: > > Did you _install_ the code for ZNavigator 2.02 _and_ the examples in that > dist? (Remove the old ZNavigator and the examples...). When did you download > the ZNavigator from the Zope site? When I fixed the ZNav, I managed to upload > a faulty version, which was up for a day or two before I noticed... ;( > Unfortunately I didn't change the version numbers when I corrected my mistake. > I corrected my mistake a couple of months ago, so if your 2.02 is newer than > that it should be OK. It's important for me to know, before I start hacking... > > The problem is that (if I remember correctly, I have not looked at the code > for some time...) the DateTime stuff in Zope changed at some point. I had to > change the ZNavigator, so that it now uses Date _strings_ internally, > instead of DateTime objects... The problems arise because old NavItems (although > you cannot see it), have their date and expire data stored as DateObjects > instead of as strings. What you can try to do to fix the problems is to walk > through (either by hand or by DTML) your NavItems, open them and _save_ them > back without any modification. This should fix the problems. Another thing you > can look at is the precision of the date. The date should have a precision of > one day, not in seconds... (This was one of the problems the the new DateTime > objects, and the easiest way to fix it was to make dates strings and convert > strings to DTObjects when date comparison/algebra is needed...) > Of course it is possible that there is a bug somewhere, but I and a number of > people have been using the current version for months without problems. > > Let me hear how it went, > take care, > > -jonas- > > On Fri, Dec 08, 2000 at 10:51:30AM +0100, Olaf Zanger wrote: > > > > > > Jonas Juselius schrieb: > > > > > > Yes I have an idea... ;-) > > > > > > Due to some changes in Zope2, the ZNavigator broke... Try to get the latest > > > version (2.02) from www.zope.org/Members/jonas/ZNavigator/ and install the > > > examples from that distro instead. > > > > thanks for the tip, but didn't help, sorry > > > > navbar_dtml shows first icon right, second and third as "_" > > on click to second i come to Foo, click to first and third "date-string > > error" > > > > i copy > > /simple_demo/foo/index_html > > to > > /simple_demo/bar/index_html > > and it works > > > > unfortunately i can not find any differences between > > /bar/index_html > > and > > /foo/index_html > > > > what's up? > > > > olaf > > > > > > > > -jonas- > > > > > > On Fri, Dec 08, 2000 at 07:59:57AM +0100, Olaf Zanger wrote: > > > > hi there, > > > > > > > > i installed ZNavigator2.00.tgz on zope 2.2.2 > > > > if i try to use the examples i can install them > > > > i can edit the pages, but if i want to view them > > > > a error page "invalid date-time string" > > > > > > > > appears > > > > > > > > any idea? > > > > > > > > olaf > > > > -- soli-con Engineering Zanger Dipl.-Ing. (FH) Olaf Zanger Nusch Lorrainestrasse 23 3013 Bern / Switzerland Fon: +41-31-332 9782 Mob: +41-76-572 9782 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.soli-con.com begin:vcard n:Zanger;Olaf Marc tel;cell:+41-76-572 9782 tel;work:+41-31-332 9782 x-mozilla-html:FALSE url:www.soli-con.com org:soli-con Engineering Zanger adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland version:2.1 email;internet:[EMAIL PROTECTED] title:Dipl.-Ing. note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A x-mozilla-cpt:;-32176 fn:Olaf Zanger end:vcard
Re: [Zope] New version of book uploaded
Hi, Jochen Knuth wrote: > and another one: > > http://www.zope.org/Members/michel/ZB/RelationalDatabases.html > sorry, another cache bug. Jochen -- -- Jochen Knuth WebMaster http://www.ipro.de IPRO GmbH Phone ++49-7152-93330 Steinbeisstr. 6 Fax ++49-7152-933340 71229 LeonbergEMail: [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] ZPatterns & terminology
Have you seen: http://www.zope.org/Members/sspickle/DumbZPatternsExample there is an upgrade in the works. ;-) I'm working out the kinks with a way to do documentation/modeling with ZPatterns. Hopefully within a week or two... -steve > "Dario" == Dario Lopez-Kästen <[EMAIL PROTECTED]> writes: >> From: "Cees de Groot" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> >> Sent: Friday, December 08, 2000 8:16 AM >> >> Chris Withers <[EMAIL PROTECTED]> said: >...I disagree, >> ZPatterns only major flaw is that its totally immersed in >its >> own jargon which very few people understand :-( >> > >> >That said, my impression is that if you can wade through the >> b/s, it's >more than worth the effort... >> > >> Hmm, maybe it's the time for a translate-zPatterns-to-english >> effort? Dario> Yes, I totally agree. It seems that Zpatterns is the thing Dario> I need to make tru my vison of self-contained Dario> plugin-components for the site(s) I am developing. However Dario> I since I am still strugglig with the concept of Dario> aquisition, the Zpattersn terminology makes my head Dario> spin. :-) Dario> /dario still digging... Dario> - Dario> Dario> Dario Lopez-Kästen Systems Developer Chalmers Univ. of Dario> Technology [EMAIL PROTECTED] ICQ will yield no hits IT Dario> Systems & Services Dario> ___ Zope Dario> maillist - [EMAIL PROTECTED] Dario> http://lists.zope.org/mailman/listinfo/zope ** No cross Dario> posts or HTML encoding! ** (Related lists - Dario> http://lists.zope.org/mailman/listinfo/zope-announce Dario> 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] New version of book uploaded
and another one: http://www.zope.org/Members/michel/ZB/RelationalDatabases.html Figure 10-5: The Add form for Z SQL Methods As usual, you must specify an id and title for the ZSQL Method. In addition you need to select a Database Connection to use with this Z SQL Methods. Give this new method the id hire_employee and select the gadfly_database_connection that you created in the last section. Next you can specify arguments to the Z SQL Method. Just like Python Methods, ZSQL Methods can take arguments. Arguments ^ ^ are used to construct SQL statement. In this case your method needs four arguments, the employee id number, the first name, the last name and the employee's salary. Type "emp_id first last salary" into the Arguments field. Don't put a comma between the two arguments. Ciao, Jochen -- -- Jochen Knuth WebMaster http://www.ipro.de IPRO GmbH Phone ++49-7152-93330 Steinbeisstr. 6 Fax ++49-7152-933340 71229 LeonbergEMail: [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] ZPatterns
Cees de Groot wrote: > > Chris Withers <[EMAIL PROTECTED]> said: > >...I disagree, ZPatterns only major flaw is that its totally immersed in > >its own jargon which very few people understand :-( > > > >That said, my impression is that if you can wade through the b/s, it's > >more than worth the effort... > > > Hmm, maybe it's the time for a translate-zPatterns-to-english effort? > > -- In fact, IMHO the problem is not so much a translation (of concepts) to English, because there are a few of those. See pje's own DropZone Example http://www.zope.org//Members/pje/Wikis/ZPatterns/DropZoneExample and Shane's more basic explanation of what is what http://www.zope.org//Members/pje/Wikis/ZPatterns/RacksAndSpecialistsSimplified The basic problem as I experience it is not so much the jargon, because you get used to it. I'll add some more specific questions where my understanding gets muddled to illustrate this Where _I_ get stuck is: 1) How do Racks (and their associates) relate to normal propertysheets and how to attributes. What is the relation to objects? 2) What do I add to a Rack and what to a Specialist to get a) a property b) a propertysheet c) an object 3) How do I switch from one implementation to another (for example from persistent storage to non-persistent storage) and what parts do I have to update 4) if I add a SkinScript, what does it really do? How does it relate to my Rack, and how to the Specialist? How can I use it and where do I use it - in the Rack or in the Specialist, or do they both have their own domain? 5) How do I talk to a Specialists? What will it say back? For example, if I have a 'virtual object' (let's say a person that gets its properties from ad RDB and is accessed by its name), should I be able to access it by direct URL traversal /WhateverSpecialist/Name or do I add a querystring /WhateverSpecialist?name=Name There should just be some annotated step by step guides. I'd like to add some, but i first have to find out how ;-( my 2 cents Rik ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] New version of book uploaded
Hi, Michel Pelletier wrote: > Greetings, > > Read this carefully, you may end up with a free, signed copy of the Zope > book. > ... > So without further a-do here's the URL. Have fun! > > http://www.zope.org/Members/michel/ZB/ > > -Michel ok, it's not in the book itself but linked from it (Status): http://www.zope.org/Documentation/new/book.html The book covers Zope 2.3 which has not been released yet. Therefore some things will be a little confusing. The main differences between Zope 2.3 and Zope 2.2 is the lack of Python Methods and Perl Methods in Zope 2.2. You can use External Methods for restricted Python Methods. Jochen -- -- Jochen Knuth WebMaster http://www.ipro.de IPRO GmbH Phone ++49-7152-93330 Steinbeisstr. 6 Fax ++49-7152-933340 71229 LeonbergEMail: [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: Strange Catalog problem.
|| > Apparently "Update Catalog" doesn't touch the old invalid || > pointers in the index. || || Yes. Is it a feature or a bug ? Because this causes a lot of || trouble when || you want to transfer a 2.1.6 to 2.2.x site (because of the || lack of subclass || objets proposal when you want to do a new clean index.. || In my opinion ZCatalog should clean out invalid references. So I would classify it as a bug. || > Also, for Yihaw you must find object of all types || otherwise it won't catalog || > the subclassed objects! || || That's weird. It only shows the main Zclass. So doing that || the catalog || ends up with thousands of other objects ! || || Is this also a feature or a bug ? This is in my opinion also a bug. If they at least could catalog all derived classes. -- Sincerely yours/Med venlig hilsen Søren Roug <[EMAIL PROTECTED]> European Environment Agency Kongens Nytorv 6 Tel: +45 3336 7212 Fax: +45 3336 7199 ICQ: 13804170 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: Strange Catalog problem.
Le 8 Dec 2000, à 11:44, Søren Roug a écrit : > I think you should do "Find Items to ZCatalog" and do a clean index of the > whole website. Yes. But problem is to get the *whole* objects or nothing but can't get only the Yihaw objects and subclassed objects (see below). I guess it's a ZCatalog problem (or a feature ?) > Apparently "Update Catalog" doesn't touch the old invalid > pointers in the index. Yes. Is it a feature or a bug ? Because this causes a lot of trouble when you want to transfer a 2.1.6 to 2.2.x site (because of the lack of subclass objets proposal when you want to do a new clean index.. > Also, for Yihaw you must find object of all types otherwise it won't catalog > the subclassed objects! That's weird. It only shows the main Zclass. So doing that the catalog ends up with thousands of other objects ! Is this also a feature or a bug ? Thanks for the help. -- Didier Georgieff DDAF du Bas-Rhin - Cellule SIG 2, rue des Mineurs 67070 Strasbourg Cedex tél : 03.88.25.20.33 - fax : 03.88.25.20.01 email : [EMAIL PROTECTED] SIT du Bas-Rhin : http://www.bas-rhin.sit.gouv.fr GéoWeb http://sertit10.u-strasbg.fr ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] ZPatterns
> > I simple products that does things the ZPatterns way, and > explains why and > > how would be just great. > > The problem, and this I totally agree with PJE, Ty Sarna and the other > people who're using ZPatterns and fully understand it, is > that they are > using it to do their jobs and so really haven't got the time > to come up > with nice examples and finished docs. > > To be honest, I'm just glad they chose to open source it all :-) And so am I. What I meant was that there seems to be more and more people that that start to understand it, at least a small bit of it. If all these people contributed their small part to a HowToWriteASimpleAndGoodZPatternsProductZWiki, then the documentation bit would be solved. Maybe people like you? :) /Magnus ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: Strange Catalog problem.
I think you should do "Find Items to ZCatalog" and do a clean index of the whole website. Apparently "Update Catalog" doesn't touch the old invalid pointers in the index. Also, for Yihaw you must find object of all types otherwise it won't catalog the subclassed objects! The correct behaviour in 2.2 is with a preceeding '/'. || -Original Message- || From: Didier Georgieff [mailto:[EMAIL PROTECTED]] || Sent: Friday, December 08, 2000 10:45 || To: [EMAIL PROTECTED] || Cc: [EMAIL PROTECTED] || Subject: Strange Catalog problem. || || || Hello, || || I'm using a modified (french, adding programatically and new || classes but || the ground features are untouched) Yihaw on 2.2.4 (linux). || || I've got a strange behaviours (YihawNews boxes don't show || the new items) || until i found that "old" (before upgrading to 2.2.2 + 2.2.4 || update) items on || the catalog don't start with "/" and the new ones does start || with "/". || || Reindexing gives me the same 2 categories and change nothing. || || I'm puzzled with : || * what is the "correct behaviour / or no / ? || * why reindexing doesn't homogenize the / ? || || The "new" items are now added programatically and the "old" || ones where || done thru Zope interface. || || And sometimes i still get a "problem uncataloging before || catalogging" || message on the Zope console. || || Am i missing some important change ? || Thanks in advance. || || || -- || Didier Georgieff || DDAF du Bas-Rhin - Cellule SIG || 2, rue des Mineurs 67070 Strasbourg Cedex || tél : 03.88.25.20.33 - fax : 03.88.25.20.01 || email : [EMAIL PROTECTED] || SIT du Bas-Rhin : http://www.bas-rhin.sit.gouv.fr || GéoWeb http://sertit10.u-strasbg.fr || ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Cut/copy/paste problems
Hi! > i knew that! :) btw, there's currently sparse document on mod_pcgi2. i'd > like to change that, but i need info from you (the author ..straight from the > horses mouth - so to speak) or snippets from your httpd.conf. do i need to > have Zope.cgi available? i think i do since otherwise, there'll be no > connection. or am i missing something? You missed pcgi-wrapper :) If you look into Zope.cgi (it is just plain text file) you'd found it is a script interpreted by pcgi-wrapper. That very pcgi-wrapper is a binary file compiled from pcgi-wrapper.c during the Zope installation process. The pcgi-wrapper binary is the program that implements PCGI protocol. When I wrote mod_pcgi2, I borrowed a lot of code from pcgi-wrapper.c. That way you do not need Zope.cgi or pcgi-wrapper - the PCGI code is already in mod_pcgi2. > how can i finetune the performance? it seems that under heavy load, eg 100 > simultaneous apache connection, it'd get loger to contact the server. in the > browser, we'd see contacting the server, waiting for reply .. for about 3-4 > secs before we get any activity/reply from server. You'd need to finetune Zope, not the mod_pcgi2 module. When you connect to Zope-behind-Apache the process is going the following path: 1) browser sends a rquest to Apache 2) Apache invokes the mod_pcgi2 handler 3) the handler passes the request to Zope 4) !!! here is the problem to finetune !!! If Zope's own pull requests handlers is empty - Zope does not handle the request, but queues the request and waits 5) after Zope processes the request it passes the results back 6) mod_pcgi2 passes the results to Apache 7) Apache passess it back to browser. Ususally there are 4 threads in Zope, and 7 ZODB connections. The first number - 4 threads - could be configured by passing parameter to z2.py. If you raise the number much, you'd need to raise he seconf number somwhere in the ZODB source code. These are points for finetuning. Actually you may need to tune more things, but these things are just totally unrelated to mod_pcgi2. Tune ZODB cache, install and learn to use cacheing Products (the are a number of caches for Zope), use squid, etc. > when i do a packet dump, it seems that the machine needs a couple of SYN > before getting and ACK from the server. do you think it has anything to do > with mod_pcgi2? sorry if it's not. I'm pretty sure it has nothing with mod_pcgi2. SYN/ACK are properties of TCP/IP protocols, and PCGI protocol is much higher level. Oleg. Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] StructuredText with Metapublisher content
Hi, when I render a DTML-Method abc containing structured text content with , the output is correctly rendered. when I render the content of a MetaPublisher entry with , then the output is not correctly rendered. Only constructs like **bold** are recognized. No tables or lists or paragraphs. Did anyone experience this with a solution ? Regards, oliver --- ..you could spend *all day* customizing the title bar. Believe me. I speak from experience." (By Matt Welsh) --- Oliver Pabst .-. mailto:[EMAIL PROTECTED]: : phone :+49 681 56600600 :project department : SYBCOM GmbH fax :+49 681 56600660 : : http://www.sybcom.de ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] ZPatterns
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >Hmm, maybe it's the time for a translate-zPatterns-to-english effort? I'll give it a try: Normally you talk about multi tier applications, when talking about something like zPatterns. Say you want to make a website where users can write articles and comments, like Slashdot. Then in asp, or to a lesser degree Zope you will write your application in some sort of template language. VBScript or dtml. New programmers will mix together persistence, presentation and logic all over the place. That is a bad idea. When you get a little better at programming you make classes that handles database connections, classes that handles the business logic and classes that handles the layout. So in this case you will make a user table in your SQL database, an article table and a comment table. Then you will make some logic to controll it, and some code to view it. This is a three tier system. zPatterns adds a few more tiers and sugar on top. Normally in Zope you would make an folderish article Python product or zClass that can contain comments. And also you would make a Python product or zClass for users. Saving their names, email, webadresses, list of articles or whatever. All fine and dandy. But say instead of using the ZODB for storing user data that you want to use the database that the company allready have with employees??? You would have to rewrite your Python product or zClass from scratch. To avoid this zPatterns use an anbstraction of a table called a "Rack". If you define this Rack how it is implemented at the backend doesn't matter. It can be an SQL database, or saved in the ZODB. The important thing is that you allways acces the Rack the same way so any other part of your application don't have to change when you change storage backend. Often you want to look at data in different ways. You have your database, your logic, and different ways to look at the data. This is called the "Model View Controller" principle in standard Geek talk. You use it to avoid duplication of data. The "DRY" principle (Don't Repeat Yourself). When I see an article I also want see all comments made to this article. Furthermore when I see a user, I also want to see the comments that this user has made and all the articles that he has written. Naturally you don't just copy the list of comment's to the article or the user. This would cause redundancy and bad problems when you change values in the original data. You make a new combined view of your model instead, where you join articles and comments on one page. So data from two different racks can be viewed in one place. In zPattern lingo this is called a "Specialist". But a "view" by any other name still smells as sweet. To use these two nice abstractions in Zope it has to work a little more Zope like. Often when making a zClass you use a folderish object. the zPattern folder is called a "PlugIn". It can have properties just like a normal zClass. In zPatterns the interface or "property sheet" used for handling the values in a single item in a rack. (What would be a single row in an SQL table) is called an "AttributeProvider". When you combine the content of one or more racks into a new Specialist (or view, remmeber?) you use a "SheetProvider" to edit the data. This is what would be a normal management interface in a typical web application. Anyhoo, this is how I unerstand it. But I must add that I have never used zPatterns, This is all from how I understand the documentation, the Wiki etc combined with my limited knowledge of computer science. Hope this helps. Regards Max M ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope newsgroups
Hi, are there newsgroups about zope? Regards Thomas ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] New version of book uploaded
On Friday 08 December 2000 17:35, Michel Pelletier wrote: > On Fri, 8 Dec 2000, Bak@kedai wrote: > > On Friday 08 December 2000 09:07, Michel Pelletier wrote: > > > Greetings, > > > > > > Read this carefully, you may end up with a free, signed copy of the > > > Zope book. > > > > as ypu said, this whole chapter still uses python methods. > > Actually, the copy of the chapter in your browser cache still uses > Python Methods. The copy on the website does not. All of these you've > pointed out are old news... > > Sorry! if konquorer refreshes right, have a look see http://www.zope.org/Members/michel/ZB/ScriptingZope.html the graphics used for example. (pleeze make this one count!) --8<--- Python Method (Internal) at/hello --8<--- does it count? :) -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine as you woke this morning, and open up your eyes, did you notice the tear stains lining your face were mine.. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] ZPatterns
"Magnus Heino (Rivermen)" wrote: > > Are there any more docs or any examples available now than a couple of > months ago? Maybe > I simple products that does things the ZPatterns way, and explains why and > how would be just great. The problem, and this I totally agree with PJE, Ty Sarna and the other people who're using ZPatterns and fully understand it, is that they are using it to do their jobs and so really haven't got the time to come up with nice examples and finished docs. To be honest, I'm just glad they chose to open source it all :-) 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] ZNavigator
Jonas Juselius schrieb: > > Yes I have an idea... ;-) > > Due to some changes in Zope2, the ZNavigator broke... Try to get the latest > version (2.02) from www.zope.org/Members/jonas/ZNavigator/ and install the > examples from that distro instead. thanks for the tip, but didn't help, sorry navbar_dtml shows first icon right, second and third as "_" on click to second i come to Foo, click to first and third "date-string error" i copy /simple_demo/foo/index_html to /simple_demo/bar/index_html and it works unfortunately i can not find any differences between /bar/index_html and /foo/index_html what's up? olaf > > -jonas- > > On Fri, Dec 08, 2000 at 07:59:57AM +0100, Olaf Zanger wrote: > > hi there, > > > > i installed ZNavigator2.00.tgz on zope 2.2.2 > > if i try to use the examples i can install them > > i can edit the pages, but if i want to view them > > a error page "invalid date-time string" > > > > appears > > > > any idea? > > > > olaf > > > > -- > > soli-con Engineering Zanger > > Dipl.-Ing. (FH) Olaf Zanger Nusch > > Lorrainestrasse 23 > > 3013 Bern / Switzerland > > Fon: +41-31-332 9782 > > Mob: +41-76-572 9782 > > mailto:[EMAIL PROTECTED] > > mailto:[EMAIL PROTECTED] > > http://www.soli-con.com > Content-Description: Visitenkarte für Olaf Zanger > > -- > And what is good, Phaedrus, > And what is not--- > Need we ask anyone to tell us these things? > > [ PGP public key: http://www.iki.fi/jonas/pubkey.asc ] -- soli-con Engineering Zanger Dipl.-Ing. (FH) Olaf Zanger Nusch Lorrainestrasse 23 3013 Bern / Switzerland Fon: +41-31-332 9782 Mob: +41-76-572 9782 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.soli-con.com begin:vcard n:Zanger;Olaf Marc tel;cell:+41-76-572 9782 tel;work:+41-31-332 9782 x-mozilla-html:FALSE url:www.soli-con.com org:soli-con Engineering Zanger adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland version:2.1 email;internet:[EMAIL PROTECTED] title:Dipl.-Ing. note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A x-mozilla-cpt:;-32176 fn:Olaf Zanger end:vcard
Re: [Zope] New version of book uploaded
On Friday 08 December 2000 17:35, you wrote: > On Fri, 8 Dec 2000, Bak@kedai wrote: > > On Friday 08 December 2000 09:07, Michel Pelletier wrote: > > > Greetings, > > > > > > Read this carefully, you may end up with a free, signed copy of the > > > Zope book. > > > > as ypu said, this whole chapter still uses python methods. > > Actually, the copy of the chapter in your browser cache still uses > Python Methods. The copy on the website does not. All of these you've > pointed out are old news... > > Sorry! bugger! kill the cache :) > > -Michel > > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine I will follow you! ..Damage Inc ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] does not work!
Hi, trying the example from the DTML-Documentation, page 3, leads to the following result when viewing the page. Why? I am using Zope 2.2.4. I get the same results on W98/WNT and Linux. Without this tag, the page works. Regards Thomas {PRIVATE}{PRIVATE "TYPE=PICT;ALT=Zope"} Zope Error Zope has encountered an error while publishing this resource. Error Type: KeyError Error Value: date Troubleshooting Suggestions Thisresource may be trying to reference a nonexistent object or variable date. The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. {HYPERLINK "http://www.zope.org/Credits"}{PRIVATE "TYPE=PICT;ALT=Powered by Zope"}{HYPERLINK "http://www.zope.org/Credits"} Traceback (innermost last): File D:\Programme\Zope\lib\python\ZPublisher\Publish.py , line 222, in publish_module File D:\Programme\Zope\lib\python\ZPublisher\Publish.py , line 187, in publish File D:\Programme\Zope\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File D:\Programme\Zope\lib\python\ZPublisher\Publish.py , line 171, in publish File D:\Programme\Zope\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: test) File D:\Programme\Zope\lib\python\ZPublisher\Publish.py , line 112, in call_object (Object: test) File D:\Programme\Zope\lib\python\OFS\DTMLDocument.py, line 177, in __call__ (Object: test) File D:\Programme\Zope\lib\python\DocumentTemplate\DT_S tring.py, line 528, in __call__ (Object: test) File D:\Programme\Zope\lib\python\DocumentTemplate\DT_V ar.py, line 276, in render (Object: date) KeyError: (see above) Thomas Volkmar Worm Diagonalstr. 25 D-20537 Hamburg Tel.: +49 40 2198 2741 Fax.: +49 40 2198 2742 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] Strange Catalog problem.
Hello, I'm using a modified (french, adding programatically and new classes but the ground features are untouched) Yihaw on 2.2.4 (linux). I've got a strange behaviours (YihawNews boxes don't show the new items) until i found that "old" (before upgrading to 2.2.2 + 2.2.4 update) items on the catalog don't start with "/" and the new ones does start with "/". Reindexing gives me the same 2 categories and change nothing. I'm puzzled with : * what is the "correct behaviour / or no / ? * why reindexing doesn't homogenize the / ? The "new" items are now added programatically and the "old" ones where done thru Zope interface. And sometimes i still get a "problem uncataloging before catalogging" message on the Zope console. Am i missing some important change ? Thanks in advance. -- Didier Georgieff DDAF du Bas-Rhin - Cellule SIG 2, rue des Mineurs 67070 Strasbourg Cedex tél : 03.88.25.20.33 - fax : 03.88.25.20.01 email : [EMAIL PROTECTED] SIT du Bas-Rhin : http://www.bas-rhin.sit.gouv.fr GéoWeb http://sertit10.u-strasbg.fr ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] New version of book uploaded
On Fri, 8 Dec 2000, Bak@kedai wrote: > On Friday 08 December 2000 09:07, Michel Pelletier wrote: > > Greetings, > > > > Read this carefully, you may end up with a free, signed copy of the Zope > > book. > > > > as ypu said, this whole chapter still uses python methods. Actually, the copy of the chapter in your browser cache still uses Python Methods. The copy on the website does not. All of these you've pointed out are old news... Sorry! -Michel ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] New version of book uploaded
On Friday 08 December 2000 09:07, Michel Pelletier wrote: > Greetings, > > Read this carefully, you may end up with a free, signed copy of the Zope > book. > as ypu said, this whole chapter still uses python methods. not sure whther it's been pointed out or not. sent earlier without the URL. here it is again. do i qualify?:") http://www.zope.org/Members/michel/ZB/ScriptingZope.html ---8<--- Python MethodsYou can use Python, a scripting language, to script Zope objects and perform other tasks. Python methods give you general purpose programming facilities within Zope. Perl MethodsYou can use Perl, a powerful text processing language, to script Zope objects and access Perl libraries. Perl Methods offer similar benefits as Python Methods, but may b ---8<- and .. 8< Zope methods are called from the web or from other methods. Almost any type of method can call any other type of method. You can call a Python Method from a DTML Method, or a built-in method from a Perl Method --8<- there's more.. should i oint all occurrences of python method? http://www.kedai.com.my/kk http://www.kedai.com.my/eZine use Zope? then you got HOPE! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] New version of book uploaded
On Friday 08 December 2000 09:07, Michel Pelletier wrote: > Greetings, > > Read this carefully, you may end up with a free, signed copy of the Zope > book. > hee's a shot, don't know whether it's been pointed out or not ---8<-- Python MethodsYou can use Python, a scripting language, to script Zope objects and perform other tasks. Python methods give you general purpose programming facilities within Zope. Perl MethodsYou can use Perl, a powerful text processing language, to script Zope objects and access Perl libraries. Perl Methods offer similar benefits as Python Methods, but may be more appealing for folks who know Perl but not Python, or who want to use Perl libraries for which there are no Python equivalent 8<- -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine Just bring it! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] New version of book uploaded
Hi, Michel Pelletier wrote: > > Greetings, > > Read this carefully, you may end up with a free, signed copy of the Zope > book. Chapter 9: Searching and Categorizing Content Searching Catalogs Searching from Python Here is a Python Method called relevantSectionNews that accepts ^ no parameters. This method queries the news Catalog with the current folder's id: ... Holger ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** 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] ZPatterns & terminology
> From: "Cees de Groot" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, December 08, 2000 8:16 AM > > Chris Withers <[EMAIL PROTECTED]> said: > >...I disagree, ZPatterns only major flaw is that its totally immersed in > >its own jargon which very few people understand :-( > > > >That said, my impression is that if you can wade through the b/s, it's > >more than worth the effort... > > > Hmm, maybe it's the time for a translate-zPatterns-to-english effort? Yes, I totally agree. It seems that Zpatterns is the thing I need to make tru my vison of self-contained plugin-components for the site(s) I am developing. However I since I am still strugglig with the concept of aquisition, the Zpattersn terminology makes my head spin. :-) /dario still digging... - Dario Lopez-Kästen Systems Developer Chalmers Univ. of Technology [EMAIL PROTECTED] ICQ will yield no hitsIT Systems & Services ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Using aquisition inside a dtml method of a product ?
On Thu, Dec 07, 2000 at 10:07:25PM -0500, Tres Seaver wrote: > > Could it be that you don't derive your product class (directly or > indirectly) from Acquisition.Implicit? Otherwise, I'm stumped. > I use just the code you describe inside the PTK, for instance. Yes, that was the problem. I took the ExternalMethod product as example - this one uses explicit aquisition. Andreas ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )