Re: Zope development tutorial (Re: [Zope] Re: Product refreshing in Zope 2.9)
Tim Nash wrote at 2006-2-2 11:50 -0800: > ... >As for a specific question. Here goes: > Could I please get a Zope application written by someone who has > >2 years of Zope experience that uses several dtml or zpt pages, that >1. registers a user 2. collects data from a user and saves that data >to the zodb 3. manages the accumulation of data in the zodb? If it was >developed outside the zmi (I hope) can you also send me the associated >test framework? Have a look at Plone or Silva or CPS. There, you find complete content management systems on top of Zope doing all of the things you call for (but much more). >> Dieter >> -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZEO disconnects, Zope auto restarts (via zopectl)
On Feb 3, 2006, at 1:06 PM, Paul Winkler wrote: If I were in your shoes the first thing I'd do is bump up the log levels on both zope and zeo to BLATHER. Adds overhead I know, but you need to find the problem somehow... it's a weird one, I've never seen zope restart "for no reason". This can be a symptom of a segfault if you've got zope running under a daemon manager like "zopectl/zdaemon/supervisord". - C ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZEO disconnects, Zope auto restarts (via zopectl)
On Fri, Feb 03, 2006 at 08:35:11AM -0800, Dennis Allison wrote: > Timing correlates to the second. Zope and ZEO live on the > same physical box. OK. Do you have more than one ZEO client? If not, I'd reevaluate whether you need ZEO at all. (It's great for zopectl debug on a live system, but otherwise it does nothing but add overhead if you're not using it to run multiple Zopes. But you probably knew that.) > I doubt if I am hitting a limit. The box has nearly 8GB of > memory most of which (6GB) is used by linux as a cache. > No messages in the logs. OK. It should be pretty obvious if you were hitting a limit. I don't think it's possible on linux to run out of memory without the kernel complaining somewhere in /var/log. > > Unrelated to your problem, and maybe you know this, but depending on the > > size of your storage, I'd consider increasing the zeo client cache size. > > It's a disk cache and you can safely make it huge. But if you don't see > > "cache flipping" messages in your event log, it may not matter. > > > Done, but I cannot report on the effect. Well, as I said, it's very unlikely to have any impact on your problem. If I were in your shoes the first thing I'd do is bump up the log levels on both zope and zeo to BLATHER. Adds overhead I know, but you need to find the problem somehow... it's a weird one, I've never seen zope restart "for no reason". -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zope / web content
--On 3. Februar 2006 18:42:22 + azzouz <[EMAIL PROTECTED]> wrote: Hi, In our institut customer administration want to manage editing updating and modifying web page under zope with account authentification. There aren't supposed to know html, dmtl, zpt language. Are there tools to allow them do those actions under text format which will fill the web content of our web site under zope plateform. Why don't you use a CMS like Plone or CPS? Such systems are designed to deal with content for non-technical ppl. -aj pgp9X29NEnQlz.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zope / web content
Hi, In our institut customer administration want to manage editing updating and modifying web page under zope with account authentification. There aren't supposed to know html, dmtl, zpt language. Are there tools to allow them do those actions under text format which will fill the web content of our web site under zope plateform. Thanks sincerely ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZEO disconnects, Zope auto restarts (via zopectl)
Paul, Thanks for the assist. Comments on your comments interlinearly below. I have increased cache and other resources to see what the impact will be. On Fri, 3 Feb 2006, Paul Winkler wrote: > On Fri, Feb 03, 2006 at 01:00:45AM -0800, Dennis Allison wrote: > > > > Zope 2.9.0 > > > > We are seeing spontaneous restarts of Zope with no indication in any of > > the standard Zope logs. Looking at the ZEO log indicates that the > > restarts of Zope are due to a lost connection between Zope & ZEO but > > with no other information. The logging level is set at the distribution > > default (INFO). > > Are you *sure* that is the cause, rather than the effect? No, I am not and there's nothing in the logs which hints at why it restarted. We are running under load. The failures are silent. We do have a fairly high rate of conflict errors (which all get resolved finally!). > > If zope restarts for any reason, I'd expect the zeo log to > show a disconnect and reconnect as a result. > > Check the clocks on your zope and zeo boxes and make sure the timing of > events in your logs is really what you think it is. (Systems that > aren't running ntpd are the bane of my existence...) Timing correlates to the second. Zope and ZEO live on the same physical box. > > Wild guess: Any chance your Zope process is running out of > memory? I've had that on several occasions, when some > naively-written software attempts to do something huge in > memory that should really use a temp file on disk. > (Zope itself used to have some code like that in the FTP > server, don't know if it still does.) > I doubt if I am hitting a limit. The box has nearly 8GB of memory most of which (6GB) is used by linux as a cache. No messages in the logs. > I discovered this by looking in /var/log/messages. > At least on linux, the kernel will log something there > when it kills a process that consumes all available memory. > > > We are running a fairly vanilla setup, excerpted below: > > [snip...] > > Unrelated to your problem, and maybe you know this, but depending on the > size of your storage, I'd consider increasing the zeo client cache size. > It's a disk cache and you can safely make it huge. But if you don't see > "cache flipping" messages in your event log, it may not matter. > Done, but I cannot report on the effect. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] inheritance and aqusition question
On Fri, Feb 03, 2006 at 02:04:49PM +0100, Roman Klesel wrote: > Hello Andrew, > > thanks for your reply. > > Andrew Milton schrieb: > > > > One (or more) of the following two; > > > > Your class isn't yet fully instantiated and Acquisition wrapped, this > > normally > > doesn't occur until your class is inside the ZODB. > > That's true! And it's nor supposed to be. It's only a temporary Object that's > being destroyed > after the method in which it's created has finished processing. > > >You generally need to use a > > 'post init' method to do a 2-stage init so that subitems can acquire items. > > There are Zope hooks you can use (manage_afterAdd), or you can call your > > own methods in the "manage_add" Factory method of your product. > > > > If this is what you are doing then it's probably; > > > > The importSingle class must be an attribute of the Controller class for > > Acquisition to work in this way. > > I wouldn't like to do that either, because I don't want that object to > persist. > > Probably I just do things in the wrong way. What I wnat to do is: > > In the temporary object: > > try: >h=open('file',r) > except: >em = 'File %s does not exist' % file >return REQUEST.RESPONSE.redirect(self.manage_editSettings(REQUEST), em) ... and you want manage_editSettings to be acquired, ok. As has been suggested, you probably don't have an acquisition wrapper set up. You can create one without persisting your wrapped object like so: class Controller(...): def some_method(self, ...): ... temp = importSingle(...) temp = temp.__of__(self) # this creates the wrapper temp.someMethod() ... Once you have a wrapper, you can call methods on it and those methods can successfully acquire things from the acquisition context (in this case the Controller instance). This example assumes that your Controller is responsible for instantiating the importSingle instances. But having said that, I too wonder why use acquisition for this. Why not just pass in a reference to the Controller instance and call methods on it explicitly? -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Multiple Zope Instance
You just change the port numbers in the zope.conf file. Change zope-instance-2 to run on 8080.On 2/3/06, Infor Gates < [EMAIL PROTECTED]> wrote:Dear zopistI am using Zope 2.8.4 on windows. I have installed and created a zope instance-1 which run as a service in WindowXP. Later, I created a 2nd zope instance-2 by mkzopeinstance. How can I configure zope to run zope instance-2 as the default service instead of instance-1?Thanks alot.CY Brings words and photos together (easily) with PhotoMail - it's free and works with Yahoo! Mail. ___Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )-- Michael ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZEO disconnects, Zope auto restarts (via zopectl)
On Fri, Feb 03, 2006 at 01:00:45AM -0800, Dennis Allison wrote: > > Zope 2.9.0 > > We are seeing spontaneous restarts of Zope with no indication in any of > the standard Zope logs. Looking at the ZEO log indicates that the > restarts of Zope are due to a lost connection between Zope & ZEO but > with no other information. The logging level is set at the distribution > default (INFO). Are you *sure* that is the cause, rather than the effect? If zope restarts for any reason, I'd expect the zeo log to show a disconnect and reconnect as a result. Check the clocks on your zope and zeo boxes and make sure the timing of events in your logs is really what you think it is. (Systems that aren't running ntpd are the bane of my existence...) Wild guess: Any chance your Zope process is running out of memory? I've had that on several occasions, when some naively-written software attempts to do something huge in memory that should really use a temp file on disk. (Zope itself used to have some code like that in the FTP server, don't know if it still does.) I discovered this by looking in /var/log/messages. At least on linux, the kernel will log something there when it kills a process that consumes all available memory. > We are running a fairly vanilla setup, excerpted below: > > <> > # ZEO client storage: > # > > mount-point / > # ZODB cache, in number of objects > cache-size 5000 > > server localhost:8301 > storage 1 > var $INSTANCE/var > # ZEO client cache, in bytes > cache-size 20MB Unrelated to your problem, and maybe you know this, but depending on the size of your storage, I'd consider increasing the zeo client cache size. It's a disk cache and you can safely make it huge. But if you don't see "cache flipping" messages in your event log, it may not matter. > # Uncomment to have a persistent disk cache > client group1-zeo > > > > <> > > address localhost:8301 > read-only false > invalidation-queue-size 100 > pid-filename $INSTANCE/var/ZEO.pid > # monitor-address PORT > # transaction-timeout SECONDS > > > > program $INSTANCE/bin/runzeo > socket-name $INSTANCE/etc/zeo.zdsock > daemon true > forever false > backoff-limit 10 > exit-codes 0, 2 > directory $INSTANCE > default-to-interactive true > # user zope > python /usr/bin/python2.4 > zdrun /usr/local/src/zope/Zope2.9/lib64/python/zdaemon/zdrun.py > > # This logfile should match the one in the zeo.conf file. > # It is used by zdctl's logtail command, zdrun/zdctl doesn't write it. > logfile $INSTANCE/log/zeo.log > > > It's not clear what changes will lead to a more stable connection because > it is not clear what's triggering the problem. Any advice would be > appreciated. > > Presumably the shotgun approach would work -- increase the cache sizes, > lengthen the invalidation-queue-size, and increase the backoff-limit but > it would be nice to have some guidance. > > 5~ > > > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: ZEO disconnects, Zope auto restarts (via zopectl)
Dennis Allison wrote: We are seeing spontaneous restarts of Zope with no indication in any of the standard Zope logs. Looking at the ZEO log indicates that the restarts of Zope are due to a lost connection between Zope & ZEO but with no other information. The logging level is set at the distribution default (INFO). The restarts are a huge problem because session variables are not persistent and so all of the user state they contain is lost on restart. In our statful implementation, this is a major problem. I want to adjust the configuration so that the Zope/ZEO connection is stable. In our configuration, Zope and ZEO are linked via localhost on a distinguished port. I've Googled about looking for some infomation about tuning the ZEO/Zope interface, but have found little real information. Some additional log detail would be helpful. Once established, connections between ZEO server and Zope should be totally stable. I'd investigate network or firewall problems, and I'd start by using a network trace to find out what's happening at the TCP and IP levels. Florent -- Florent Guillaume, Nuxeo (Paris, France) Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: raw trace log format
It's the size of the POST, and 0 for a GET. Basically the size of received data (appart from the request headers). Florent Dennis Allison wrote: I gleened what I could from the requestrofiler code, but teh meaning of the desc field for I is not described in the comments. A quick check of the code did not help either. On Thu, 2 Feb 2006, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis Allison wrote: generally it's code id fromepoch desc The desc field is B request (e.g. 'GET /') I ??? A status_code bytes E The desc for E is normally empty. The desc for I is usually 0 or a small integer. Google could not help me find a definition for the desc value associated with I. Can someone assist? I'd suggest looking at '$SOFTWARE_HOME/utilities/requestprofiler.py', which is a tool for reporting against that log file. -- Florent Guillaume, Nuxeo (Paris, France) Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Multiple Zope Instance
Thank you for your reply. I was looking for a way to change the Window XP service to start zope-instance-2 instead of zope-instance-1. I found another way by modifying zope-instance-1/etc/zope.conf to point the zope-instance-2 directory. It works after restart the zope service. However, is this the "right" way to use multiple instances?Any advice.Thanks.michael nt milne <[EMAIL PROTECTED]> wrote: You just change the port numbers in the zope.conf file. Change zope-instance-2 to run on 8080.On 2/3/06, Infor Gates < [EMAIL PROTECTED]> wrote:Dear zopistI am using Zope 2.8.4 on windows. I have installed and created a zope instance-1 which run as a service in WindowXP. Later, I created a 2nd zope instance-2 by mkzopeinstance. How can I configure zope to run zope instance-2 as the default service instead of instance-1?Thanks alot.CY Brings words and photos together (easily) with PhotoMail - it's free and works with Yahoo! Mail. ___Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )-- Michael Get the latest photos from your camera to your friends & family fast and easy with PhotoMail from Yahoo! Mail.___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Contents of Zope digest
On 3 Feb 2006, at 14:00, Andrew Milton wrote: | Any reason why you are spamming the list with the full contents of | the digest? I think we all know the reason d8) I'm having a hard time with it, but I'm trying to be polite :P jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Contents of Zope digest
+---[ Jens Vagelpohl ]-- | | On 3 Feb 2006, at 13:44, Khachatur Yengibaryan wrote: | | >[EMAIL PROTECTED] wrote: | > | >>Send Zope mailing list submissions to | >>zope@zope.org | >> | >>To subscribe or unsubscribe via the World Wide Web, visit | >>http://mail.zope.org/mailman/listinfo/zope | >>or, via email, send a message with subject or body 'help' to | >>[EMAIL PROTECTED] | >> | >>You can reach the person managing the list at | >>[EMAIL PROTECTED] | >> | >>When replying, please edit your Subject line so it is more specific | >>than "Re: Contents of Zope digest..." | | | Any reason why you are spamming the list with the full contents of | the digest? I think we all know the reason d8) -- Andrew Milton [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Contents of Zope digest
On 3 Feb 2006, at 13:44, Khachatur Yengibaryan wrote: [EMAIL PROTECTED] wrote: Send Zope mailing list submissions to zope@zope.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.zope.org/mailman/listinfo/zope or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Zope digest..." Any reason why you are spamming the list with the full contents of the digest? jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Silva Performance isses - Memory Error & Broken Pipe
On 3 Feb 2006, at 13:39, Jonathan Bowlas wrote: -- 2006-01-25T21:08:11 ERROR(200) ZODB Couldn't load state for 0x016b87 Traceback (most recent call last): File "/usr/local/zope-2.7.8/lib/python/ZODB/Connection.py", line 597, in setstate p, serial = self._storage.load(oid, self._version) File "/usr/local/zope-2.7.8/lib/python/ZODB/FileStorage.py", line 697, in load return self._load(oid, version, self._index, self._file) File "/usr/local/zope-2.7.8/lib/python/ZODB/FileStorage.py", line 688, in _load return read(u64(plen)), serial MemoryError You're out of RAM. Pretty obvious error message I'd say. 2006-01-25T20:45:18 ERROR(200) ZServer uncaptured python exception, closing channel 144.82.100.130:43419 at 0xb0bb9f8c channel#: 1355352 requests:> (exceptions.MemoryError: [/usr/local/lib/python2.3/asyncore.py|write|77] [/usr/local/lib/python2.3/asyncore.py|handle_write_event|397] [/usr/local/lib/python2.3/asynchat.py|handle_write|152] [/usr/local/lib/python2.3/asynchat.py|initiate_send|213] [/usr/local/lib/python2.3/asynchat.py|refill_buffer|202]) same thing. Get more RAM. 2006-01-25T17:06:08 ERROR(200) ZServer uncaptured python exception, closing channel 128.40.105.130:58015 at 0xae8046ec channel#: 1281272 requests:> (socket.error:(32, 'Broken pipe') [/usr/local/lib/python2.3/asynchat.py|initiate_send|218] [/usr/local/zope-2.7.8/lib/python/ZServer/medusa/http_server.py| send|417] [/usr/local/lib/python2.3/asyncore.py|send|337]) Someone pressed the Stop button on the browser. jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Contents of Zope digest
[EMAIL PROTECTED] wrote: Send Zope mailing list submissions to zope@zope.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.zope.org/mailman/listinfo/zope or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Zope digest..." Today's Topics: 1. Re: Zope development tutorial (Re: [Zope] Re: Product refreshing in Zope 2.9) (Tim Nash) 2. raw trace log format (Dennis Allison) 3. Re: raw trace log format (Tres Seaver) 4. Re: Re: raw trace log format (Dennis Allison) 5. Re: Re: raw trace log format (Chris McDonough) 6. Re: LocalFS (Dieter Maurer) 7. Re: Ignore stopwords/characters in alphabetical results (Dieter Maurer) 8. TextIndexNG2 problems (Barry Drake) 9. Multiple Zope Instance (Infor Gates) 10. Re: TextIndexNG2 problems (Andreas Jung) 11. ZEO disconnects, Zope auto restarts (via zopectl) (Dennis Allison) 12. Re: Zope development tutorial (Re: [Zope] Re: Product refreshing in Zope 2.9) (Lennart Regebro) 13. inheritance and aqusition question (Roman Klesel) 14. Re: Zope development tutorial (Re: [Zope] Re: Product refreshing in Zope 2.9) (ardo) 15. Re: inheritance and aqusition question (Andrew Milton) 16. Re: inheritance and aqusition question (Roman Klesel) 17. Re: inheritance and aqusition question (Andrew Milton) 18. Silva Performance isses - Memory Error & Broken Pipe (Jonathan Bowlas) -- Message: 1 Date: Thu, 2 Feb 2006 11:50:26 -0800 From: Tim Nash <[EMAIL PROTECTED]> Subject: Re: Zope development tutorial (Re: [Zope] Re: Product refreshing in Zope 2.9) To: Dieter Maurer <[EMAIL PROTECTED]> Cc: zope@zope.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 The things that tie together are Zope itself and larger frameworks on top of it, such as e.g. the CMF or Plone/CPS/Silva. Do you mean that nobody actually writes an application without using CMF or Plone/CPS/Silva? If that is the case then that explains my slow rate of development. But I wonder if I want to continue with zope. It looks like a cool application server, I have written an application (slowly) and I was hoping that I could see better examples of how to write a complete application. There is very little on sourceforge. I have read the "zope bible" cover to cover and I have read most of the zope book, but I admit that I haven't read the developer book. ( hate reading large amounts of text online). I guess that is my future. As for a specific question. Here goes: Could I please get a Zope application written by someone who has > 2 years of Zope experience that uses several dtml or zpt pages, that 1. registers a user 2. collects data from a user and saves that data to the zodb 3. manages the accumulation of data in the zodb? If it was developed outside the zmi (I hope) can you also send me the associated test framework? Thanks! On 2/1/06, Dieter Maurer <[EMAIL PROTECTED]> wrote: Tim Nash wrote at 2006-1-31 11:48 -0800: ... I have "completed" my first zope product and I find that the change in mindset is the biggest challenge. Zope is cool but it is quite different from php or java or cgi. Have you read the "Zope Developper Guide"? It is something like a basic guide to product development in Zope 2. ... I have downloaded many of the products from zope.org but they really don't tie everything togather. "Products" are extensions that try to have very few dependancies. Therefore, they try not to tie other things together but use only services of Zope (which is always available). The things that tie together are Zope itself and larger frameworks on top of it, such as e.g. the CMF or Plone/CPS/Silva. I am looking for something that covers login in users, Look for the product "PAS" (PluggableAuthenticationService). building tables out of data stored in zodb, There is a product "TinyTables" (or similar) for (as the name tells you) "tiny" tables. Zope does not (yet) support large tables (it is not a relational database). But, you can use the "ZCatalog" to search your objects. Read the "searching" chapter in the Zope Book (Online, 2.7 edition). ... getters and setters for objects in the zodb, There is no difference in attribute access for persistent objects (those in the ZODB) and standard Python objects. Read the Python tutorial. collecting a variable in one page and passing it on to another page You have the standard HTML facility (e.g. query string and hidden variables; function in "ZTUtils.Zope" help you in using them) and you have sessions (explained in the Zope Book; read it!) where it modifies the data di
Re: [Zope] inheritance and aqusition question
+---[ Roman Klesel ]-- | Hello Andrew, | | thanks for your reply. | | Andrew Milton schrieb: | > | > One (or more) of the following two; | > | > Your class isn't yet fully instantiated and Acquisition wrapped, this normally | > doesn't occur until your class is inside the ZODB. | | That's true! And it's nor supposed to be. It's only a temporary Object that's being destroyed | after the method in which it's created has finished processing. [snip] | Probably I just do things in the wrong way. What I wnat to do is: | | In the temporary object: | | try: |h=open('file',r) | except: |em = 'File %s does not exist' % file |return REQUEST.RESPONSE.redirect(self.manage_editSettings(REQUEST), em) redirect should take a URL (i.e. a string), not a rendered page... | the calling Object then would pass it to the browser ... | | ... in order to do some exception handling. | | is there an other way to redirect to the settigs Form when an error occurs in this nonpersistent object? Since your class is already assuming things (manage_editSettings e.g.), a) pass in a parent object that is wrapped and call parentObj.manage_editSettings.. b) or more cleanly call parentObj.errorOccurred(message) which would do the redirect, c) or even more cleanly you could raise an exception, and catch it in the parent class, then redirect. -- Andrew Milton [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] inheritance and aqusition question
Hello Andrew, thanks for your reply. Andrew Milton schrieb: > > One (or more) of the following two; > > Your class isn't yet fully instantiated and Acquisition wrapped, this normally > doesn't occur until your class is inside the ZODB. That's true! And it's nor supposed to be. It's only a temporary Object that's being destroyed after the method in which it's created has finished processing. >You generally need to use a > 'post init' method to do a 2-stage init so that subitems can acquire items. > There are Zope hooks you can use (manage_afterAdd), or you can call your > own methods in the "manage_add" Factory method of your product. > > If this is what you are doing then it's probably; > > The importSingle class must be an attribute of the Controller class for > Acquisition to work in this way. I wouldn't like to do that either, because I don't want that object to persist. Probably I just do things in the wrong way. What I wnat to do is: In the temporary object: try: h=open('file',r) except: em = 'File %s does not exist' % file return REQUEST.RESPONSE.redirect(self.manage_editSettings(REQUEST), em) the calling Object then would pass it to the browser ... ... in order to do some exception handling. is there an other way to redirect to the settigs Form when an error occurs in this nonpersistent object? Greetings Roman ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] inheritance and aqusition question
+---[ Roman Klesel ]-- | | Hello, | | im just learning zope and python and find it difficult to get the details of aquisition and inheritance. | I have the following problem: | | (FS product) | | My base class has an attribute manage_editSettingsForm | In its __init__ method I instantiate a contoller class. | In the methods of the controller class can access self.manage_edtiSettingsForm (fine) | Now I instantiate a importSingle class in a method of the controller class. | In the methods of the importSingle class I cannot access self.manage_edtiSettingsForm (why?) One (or more) of the following two; Your class isn't yet fully instantiated and Acquisition wrapped, this normally doesn't occur until your class is inside the ZODB. You generally need to use a 'post init' method to do a 2-stage init so that subitems can acquire items. There are Zope hooks you can use (manage_afterAdd), or you can call your own methods in the "manage_add" Factory method of your product. If this is what you are doing then it's probably; The importSingle class must be an attribute of the Controller class for Acquisition to work in this way. -- Andrew Milton [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: Zope development tutorial (Re: [Zope] Re: Product refreshing in Zope 2.9)
maybe you can check iungo at http://iungo.org ?On 2/3/06, Tim Nash <[EMAIL PROTECTED] > wrote:> The things that tie together are Zope itself and larger frameworks > on top of it, such as e.g. the CMF or Plone/CPS/Silva.Do you mean that nobody actually writes an application without usingCMF or Plone/CPS/Silva? If that is the case then that explains my slowrate of development. But I wonder if I want to continue with zope. It looks like a cool application server, I have written an application(slowly) and I was hoping that I could see better examples of how towrite a complete application. There is very little on sourceforge.I have read the "zope bible" cover to cover and I have read most of the zope book, but I admit that I haven't read the developer book. (hate reading large amounts of text online). I guess that is my future.As for a specific question. Here goes: Could I please get a Zope application written by someone who has > 2 years of Zope experience that uses several dtml or zpt pages, that1. registers a user 2. collects data from a user and saves that datato the zodb 3. manages the accumulation of data in the zodb? If it was developed outside the zmi (I hope) can you also send me the associatedtest framework?Thanks!On 2/1/06, Dieter Maurer <[EMAIL PROTECTED]> wrote:> Tim Nash wrote at 2006-1-31 11:48 -0800: > > ...> > I have "completed" my first zope> >product and I find that the change in mindset is the biggest> >challenge. Zope is cool but it is quite different from php or java or > >cgi.>> Have you read the "Zope Developper Guide"?>> It is something like a basic guide to product development in Zope 2.>> > ...> >I have downloaded many of the products from > >zope.org but they really don't tie everything togather.>> "Products" are extensions that try to have very few dependancies.> Therefore, they try not to tie other things together but use > only services of Zope (which is always available).>> The things that tie together are Zope itself and larger frameworks> on top of it, such as e.g. the CMF or Plone/CPS/Silva.>> >I am looking > >for something that covers login in users,>> Look for the product "PAS" (PluggableAuthenticationService).>> >building tables out of data> >stored in zodb, >> There is a product "TinyTables" (or similar) for (as the name tells you)> "tiny" tables.>> Zope does not (yet) support large tables (it is not a relational database). > But, you can use the "ZCatalog" to search your objects.> Read the "searching" chapter in the Zope Book (Online, 2.7 edition).>> > ...> >getters and setters for objects in the zodb, >> There is no difference in attribute access for persistent objects> (those in the ZODB) and standard Python objects.>> Read the Python tutorial.>> >collecting a variable in one page and passing it on to another page >> You have the standard HTML facility (e.g. query string and hidden variables;> function in "ZTUtils.Zope" help you in using them) and> you have sessions (explained in the Zope Book; read it!) >> >where it modifies the data display, working with Sessions, etc. I> >guess what I'm looking for is a template for a real application, not> >for the individual pieces of functionality. >> I guess, you read the resources mentioned above ("Zope Developper Guide"> and "Zope Book, 2.7 edition, online") and then come back with concrete> questions.>> Maybe, you then write the tutorial you are looking for now -- to > the profit of future new Zope users...>> --> Dieter>___Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] inheritance and aqusition question
Hello, im just learning zope and python and find it difficult to get the details of aquisition and inheritance. I have the following problem: (FS product) My base class has an attribute manage_editSettingsForm In its __init__ method I instantiate a contoller class. In the methods of the controller class can access self.manage_edtiSettingsForm (fine) Now I instantiate a importSingle class in a method of the controller class. In the methods of the importSingle class I cannot access self.manage_edtiSettingsForm (why?) Controller class: from Acquisition import Implicit from Globals import InitializeClass, Persistent from Products.PythonScripts.Utility import allow_class, allow_module from AccessControl import ClassSecurityInfo from OFS.SimpleItem import SimpleItem from OFS.ObjectManager import ObjectManager from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2 from Lasttest import Lasttest import sys, os, urllib, commands, re, types import LTimport allow_module=('Controller') class Controller(Implicit,ObjectManager, SimpleItem): - importSingle Class: from Globals import InitializeClass from Acquisition import Implicit import os,re class importSingle(Implicit): I tried subclassing form SimpleItem and ObjectManager but it didn't work. What is required that inheritance will work? Greetings Roman ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: Zope development tutorial (Re: [Zope] Re: Product refreshing in Zope 2.9)
On 2/2/06, Tim Nash <[EMAIL PROTECTED]> wrote: > > The things that tie together are Zope itself and larger frameworks > > on top of it, such as e.g. the CMF or Plone/CPS/Silva. > Do you mean that nobody actually writes an application without using > CMF or Plone/CPS/Silva? If that is the case then that explains my slow > rate of development. Well, the development speed is not higher because you use these frameworks. It's just they they have done a lot of generally useful work, so you don't have to develop it. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZEO disconnects, Zope auto restarts (via zopectl)
Zope 2.9.0 We are seeing spontaneous restarts of Zope with no indication in any of the standard Zope logs. Looking at the ZEO log indicates that the restarts of Zope are due to a lost connection between Zope & ZEO but with no other information. The logging level is set at the distribution default (INFO). The restarts are a huge problem because session variables are not persistent and so all of the user state they contain is lost on restart. In our statful implementation, this is a major problem. I want to adjust the configuration so that the Zope/ZEO connection is stable. In our configuration, Zope and ZEO are linked via localhost on a distinguished port. I've Googled about looking for some infomation about tuning the ZEO/Zope interface, but have found little real information. Some additional log detail would be helpful. We are running a fairly vanilla setup, excerpted below: <> # ZEO client storage: # mount-point / # ZODB cache, in number of objects cache-size 5000 server localhost:8301 storage 1 var $INSTANCE/var # ZEO client cache, in bytes cache-size 20MB # Uncomment to have a persistent disk cache client group1-zeo <> address localhost:8301 read-only false invalidation-queue-size 100 pid-filename $INSTANCE/var/ZEO.pid # monitor-address PORT # transaction-timeout SECONDS program $INSTANCE/bin/runzeo socket-name $INSTANCE/etc/zeo.zdsock daemon true forever false backoff-limit 10 exit-codes 0, 2 directory $INSTANCE default-to-interactive true # user zope python /usr/bin/python2.4 zdrun /usr/local/src/zope/Zope2.9/lib64/python/zdaemon/zdrun.py # This logfile should match the one in the zeo.conf file. # It is used by zdctl's logtail command, zdrun/zdctl doesn't write it. logfile $INSTANCE/log/zeo.log It's not clear what changes will lead to a more stable connection because it is not clear what's triggering the problem. Any advice would be appreciated. Presumably the shotgun approach would work -- increase the cache sizes, lengthen the invalidation-queue-size, and increase the backoff-limit but it would be nice to have some guidance. 5~ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )