Re: [Zope] Accessing Zope site through network
Do you have a firewall running on that machine? Is it blocking? Remember also, it's port 8080 by default, but you probably know that because you logged in locally. (I assume) You can ping that machine over the network,right? Try login with IP not name, too. http://yourip:8080 or example: http://192.168.0.1:8080 Just thinking out loud now... good luck! Greg On 8/11/05, Saura Ramachandran <[EMAIL PROTECTED]> wrote: > Hello, > I am very new to Zope. I managed to install zope in my machine. Now I > am not able to access this site through a network. It is giving > connection refused error. Please tell me what to do. Any pointers will > be greatly appreciated. > Thanks, > Saura. > ___ > 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 ) > -- Greg Fischer 1st Byte Solutions http://www.1stbyte.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] ZASync method calls
Hi! I'm having a really complicated problem that I don't know how to put into words properly, because I'm really vague on what's causing it and the setup is highly involved; I would be _really_ glad if someone could help me out with this: I have a ZOPE instance (connected to a ZEO server) running a custom method call wrapper that decides (based on the method's arguments) to run a method asynchronously using zasync (as well as some other stuff that I think isn't important in the context of my problem). All this has been tested. For various reasons, the method call's path is approximately as follows: 0. Method call using a generic Python method 1. Python code - resolves the method's location and name using ZOPE methods 2. Method dispatcher (called via ZOPE): dispatches synchronously or asynchronously, using zasync, zope_exec and putSessionCall; the method called is again a ZOPE method that calls the final method as another ZOPE method The apparent massive indirection cannot be avoided (for rather complicated reasons). Everything is supposed to be highly generic. My problem is this: if I use a test method that dispatches such an asynchronous method that is supposed to change an instance variable (the class is persistent) and run for ten seconds, then wait for fourteen seconds and see if the method has run (check the instance variable) synchronously (while the asynchronous method is supposed to work in the background), I find the variable unchanged; further checks (using print statements) confirm that the asynchronous method indeed doesn't run until my assertion fails, even if I give it a lot of time. If I disconnect both - run the long running method asynchronously, then run (via ZOPE directly, not from within the same method call) a synchronous method that waits for fourteen seconds and checks the variable, the asynchronous call works just fine (even though both run alongsinde for a time). It isn't the number of threads available to the zserver, I've increased that and nothing has changed. Manual tests of asynchronous methods also don't show anything wrong with my zasync setup. I can only assume that the asynchronous method is _started_ only _after_ the caller has finished. Is there a reason for that, and can I circumvent it? Or am I completely wrong and something else isn't working? I'm on Windows XP SP2, ZOPE 2.7.6, Python 2.3.5 with Twisted installed. TIA, Ole ___ 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] max 2 levels of indirection?
Sean Dunn wrote: I’m running Zope 2.0.7, and I’m having a problem.. Consider me a newbie, as I’ve only been using Zope for a few weeks. After boiling the problem down to a test case, it seemed that I couldn’t have a DTML method call a DTML method which then calls a Python script. But then I realized it was a more general problem of max number levels of indirection.. So I can’t have a DTML->DTML->DTML or DTML->DTML->PythonScript. Is this a bug? When I try this, I get a Name Error, which says that the name of the 3^rd level object is not defined. Here’s an example: DTML Method TestA: DTML Method TestB: DTML Method TestC: Test C has run. If I view TestA, I get the NameError that TestC doesn’t exist. If I view TestB, I get the output “Test C has run”. All objects are in the same folder. Is there some namespace weirdness that I don’t understand? When you call DTML methods directly, they expect to be passed certain parameters, including the namespace. When you simply use the names, this is done implicitly. When calling explicitly, you can lose the namespace if you don't follow the proper convention. I think you'll find that it works if you try:: DTML Method TestA: DTML Method TestB: DTML Method TestC: Test C has run. For calling DTML explicitly, it usually looks like:: See http://www.plope.com/Books/2_7Edition/AppendixE.stx for why. Also: http://mail.zope.org/pipermail/zope-db/2003-March/001554.html This is one of the good reasons to avoid DTML, by the way. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.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] max 2 levels of indirection?
I’m running Zope 2.0.7, and I’m having a problem.. Consider me a newbie, as I’ve only been using Zope for a few weeks. After boiling the problem down to a test case, it seemed that I couldn’t have a DTML method call a DTML method which then calls a Python script. But then I realized it was a more general problem of max number levels of indirection.. So I can’t have a DTML->DTML->DTML or DTML->DTML->PythonScript. Is this a bug? When I try this, I get a Name Error, which says that the name of the 3rd level object is not defined. Here’s an example: DTML Method TestA: DTML Method TestB: DTML Method TestC: Test C has run. If I view TestA, I get the NameError that TestC doesn’t exist. If I view TestB, I get the output “Test C has run”. All objects are in the same folder. Is there some namespace weirdness that I don’t understand? Thanks, Sean ___ 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] Workflow question
Hi Dieter. On Monday, August 22, 2005, at 01:45 PM, Dieter Maurer wrote: David Pratt wrote at 2005-8-21 23:43 -0300: ... # Catch put in traversal def __bobo_traverse__(self, REQUEST): method=REQUEST.get('REQUEST_METHOD', 'GET') if method == 'PUT': PUT(REQUEST, RESPONSE) Usually, "__bobo_traverse__" gets an additional argument. I expect that you will get a "TypeError: wrong number of arguments". Ok thanks, I'll look at what else it requires After you fixed this, the code might work in your special case -- but it is not using the correct idiom: Usually, you want to handle the request method only at the end of the traversal and not at each intermediate place. For this, you can look at "REQUEST['TraversalRequestNameStack']". It contains the traversal steps still to be performed. Thanks. I'll look at this as well. # Using default put method from NullResource def _default_PUT_factory( self, name, typ, body ): ... def PUT(self, REQUEST, RESPONSE): ... Why do you override these methods as apparently, you do not use them... I guess my thought it that I want everything to happen normally with the PUT except no object creation (which seemed to occur where I had commented it out) of the PUT method. My workflow script and method from a tool still needs the content type and body for processing so overriding the original methods seemed a reasonable way to go. I'm hoping to get something together enough to test today or tomorrow. Regards David ___ 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] Workflow question
David Pratt wrote at 2005-8-21 23:43 -0300: > ... > # Catch put in traversal > def __bobo_traverse__(self, REQUEST): > method=REQUEST.get('REQUEST_METHOD', 'GET') > if method == 'PUT': > PUT(REQUEST, RESPONSE) Usually, "__bobo_traverse__" gets an additional argument. I expect that you will get a "TypeError: wrong number of arguments". After you fixed this, the code might work in your special case -- but it is not using the correct idiom: Usually, you want to handle the request method only at the end of the traversal and not at each intermediate place. For this, you can look at "REQUEST['TraversalRequestNameStack']". It contains the traversal steps still to be performed. > # Using default put method from NullResource > def _default_PUT_factory( self, name, typ, body ): > ... > def PUT(self, REQUEST, RESPONSE): > ... Why do you override these methods as apparently, you do not use them... You do use a "PUT" function (!) but you do not define it. Definitely, this will fail... -- 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] Help me with acquisition and custom types
Mark Gibson wrote at 2005-8-21 12:38 -0600: >I've created two objects, A folderish object called myfolder, and a >document-type object called mydocument. Here's how my classes are >defined... > >class mydocument( > CatalogAware, > Implicit, > Persistent, > RoleManager, > PropertyManager, > Item): >class myfolder( > CatalogAware, > Implicit, > Persistent, > RoleManager, > PropertyManager, > Folder) > >So, say I have a hierarchy like this... > >/ >/ObjectA >/folder >/folder/mydocument ( an instance of mydocument) >/folder/myfolder (an instance of myfolder) >/folder/myfolder/ObjectA > >Ok.. I want to be able to call > >http://mysite/folder/mydocument/ObjectA > - this works fine >http://mysite/folder/myfolder/ObjectA > - this works fine >http://mysite/folder/myfolder/mydocument/ObjectA > - this returns the ObjectA at '/ObjectA', I'd like it to return ObjectA >at '/folder/myfolder/ObjectA' > >Any ideas how I would go about making this happen? It will not work as acquisition works differently... You should read Jim's acquisition lecture "Containment before Context". It tells you why acquisition will not do what you like. -- 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] SQLConnectionIds
Nicholas Wieland wrote at 2005-8-22 11:47 +0200: >Again, this problem is making me mad :) >This is a simple TTW PageTemplate I'm using: > > > > > placeholder > > > > >This works without any problem, returning a list of tuples. >The same template in a FS based product raises a site error: > >Unauthorized: You are not allowed to access 'SQLConnectionIDs' in this context >(Also, an error occurred while attempting to render the standard error >message.) "SQLConnectionIDs" does not have an explicit security declaration. Therefore, it is protected by the folder's "object permission". Looks like the visitor does not have this permission. "VerboseSecurity" may help you to analyse such problemes easier... -- 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] Re: OOP and Zope.
Fernando Lujan wrote at 2005-8-22 06:01 -0600: > >I have a good knowledge of using python, there's some tutorial about >using it inside Zope with a OO design? The Zope Developper Guide? -- 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] Re: OOP and Zope.
On 8/22/05, Fernando Lujan <[EMAIL PROTECTED]> wrote: > I have a good knowledge of using python, there's some tutorial about > using it inside Zope with a OO design? For Zope2, the previously mentioned Zope Developers Guide: http://www.zope.org/Documentation/Books/ZDG/current ZopeWiki put a lot of reference at your fingertips: http://zopewiki.org/ZopeDevelopment For Zope3, a good start is "Web Component Development with Zope 3": http://www.amazon.com/exec/obidos/tg/detail/-/3540223592/002-4460899-6725627?v=glance and the "Zope 3 Developer's Handbook" is a handy reference: http://www.amazon.com/exec/obidos/tg/detail/-/0672326175/ref=pd_bxgy_text_1/002-4460899-6725627?v=glance&s=books&st=* (Also available online, if you don't like paper: http://www.zope.org/DevHome/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book). Decide if you are gonna go with Zope2 or Zope3 first. They are quite different. Ask again if you need help with the choice. :) -- 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 )
Re: [Zope] Re: OOP and Zope.
On 8/22/05, Josef Meile <[EMAIL PROTECTED]> wrote: > Yes, some people wants to drop them, but that is just a part of the > problem. Their bugs aren't a priority know, so, if I were the OP, I > wouldn't use them for a new development. I would use python based > products, which are also OO. I have a good knowledge of using python, there's some tutorial about using it inside Zope with a OO design? Thanks. Fernando Lujan ___ 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] SQLConnectionIds
Again, this problem is making me mad :) This is a simple TTW PageTemplate I'm using: placeholder This works without any problem, returning a list of tuples. The same template in a FS based product raises a site error: Unauthorized: You are not allowed to access 'SQLConnectionIDs' in this context (Also, an error occurred while attempting to render the standard error message.) that's not even logged. A very similar DTML file on the FS, that cycles through SQLConnectionIds, works perfectly. This is Zope 2.7 on Windows. Is this a Zope bug ? TIA, ngw Yahoo! Messenger: chiamate gratuite in tutto il mondo ___ 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] Help me with acquisition and custom types
On 8/21/05, Mark Gibson <[EMAIL PROTECTED]> wrote: > I've got a problem... > > I've created two objects, A folderish object called myfolder, and a > document-type object called mydocument. Here's how my classes are > defined... > > class mydocument( >CatalogAware, >Implicit, >Persistent, >RoleManager, >PropertyManager, >Item): > class myfolder( >CatalogAware, >Implicit, >Persistent, >RoleManager, >PropertyManager, >Folder) > > So, say I have a hierarchy like this... > > / > /ObjectA > /folder > /folder/mydocument ( an instance of mydocument) > /folder/myfolder (an instance of myfolder) > /folder/myfolder/ObjectA > > Ok.. I want to be able to call > > http://mysite/folder/mydocument/ObjectA > - this works fine > http://mysite/folder/myfolder/ObjectA > - this works fine > http://mysite/folder/myfolder/mydocument/ObjectA > - this returns the ObjectA at '/ObjectA', I'd like it to return ObjectA > at '/folder/myfolder/ObjectA' > > Any ideas how I would go about making this happen? Not without making your product "manually" do serious acquisition magic. But there might be an easier way. Could you tell us what you are trying to achieve? -- 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] Re: OOP and Zope.
Dieter Maurer wrote: Fernando Lujan wrote at 2005-8-19 12:16 -0600: I try to find information about programming in Zope with the OO paradigm. I didn't find many documentation... For instance, how can I define classes and instances once I just work with dtml-methods and dtml-documents? You can look at ZClasses. Note, that there are people that recommend not to use ZClasses because they want to drop ZClass support in some future Zope release. Yes, some people wants to drop them, but that is just a part of the problem. Their bugs aren't a priority know, so, if I were the OP, I wouldn't use them for a new development. I would use python based products, which are also OO. Regards, Josef ___ 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 )