Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Hi, On Tue, Dec 13, 2005 at 02:02:05PM +0100, Andreas Elvers wrote: Hi all, what the rationale of @@ anyway ? I've searched for a definition for this in the Developer Handbook and elsewhere but it's hard to search for @@ and view. (To all Gurus: Please correct me, if I'm wrong) @@ marks a given path component explicitely as a view of the previous object. Example: http://zopeserver/contents.html Could mean either The object named 'contents.html' in the root folder or (if there is no such object) The 'contents.html' view (List of contained objects) of the root folder - the object is preferred. http://zopeserver/@@contents.html Will always display the list of contained objects of the root folder - no matter if there's a object 'contents.html' or not. I'm maintaining a wiki which tries to answer all those little questions around zope3. It's in german (Sorry, my employer depends on it): http://fbo.no-ip.org/cgi-bin/twiki/view/Zope/AtAt Regards, Frank ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Andreas Elvers wrote: what the rationale of @@ anyway ? One of the reasons is that it creates a name space. If you have a view of a container named foo what happens if you create an object in the container also named foo? Does the object hide the view, or does the view hide the object? With the @@ prefix you can disambiguate. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Stephan Richter wrote: On Tuesday 13 December 2005 08:02, Andreas Elvers wrote: what the rationale of @@ anyway ? I've searched for a definition for this in the Developer Handbook and elsewhere but it's hard to search for @@ and view. For insight or pointer to documentation or source to this matter I'd be very happy. It is a shortcut for the ++view++ namespace. @@ looks like two eyes. ;-) More importantly: - It is short - It doesn't have any English words in it This is the most likely place where name spaces might appear in public URLs, so I wanted to make them as unobtrusive as possible. (If you work hard, you can avoid them altogether, but I don't expect most people to work that hard.) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Adapting a builtin?
On Tue, Dec 13, 2005 at 07:57:38AM +0100, Michael Howitz wrote: In unittests the ZCML-Directives are not used so you have to do the things from ZCML in your test-code before adaption. from zope.interface import classImplements from zope.app.testing import ztapi classImplements(str, IString) ztapi.provideAdapter(IString, IHTTPConnection, HTTPConnection) Yes, that does the job. I better go read up on testing in z3. Thanks! -- Paul Winkler http://www.slinkp.com ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Newcomer to Zope, question about Postgres
On Tuesday 13 December 2005 08:07, Andreas Elvers wrote: I have a working instance of Zope3 in Fedora, and I downloaded and built the psycopg adapter. I'm still getting errors when I try importing SQLObject, though. Is this a configuration thing, or did I neglect to download and install something I need to make this work? Zope is not affiliated with SQLObject. You have to install it separately, if you want to use sqlos or other technologies depending on it. Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Catalog for newbies
On Thursday 08 December 2005 10:56, Frank Burkhardt wrote: How do I use adapters in python? I've got an object implementing interface 'IFoo'. How to I turn it into an object implementing 'IBar'? Pretty much all introductory documentation for Zope 3 will talk about this, including the txt files in zope.interface and zope.component. Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] logout feature with zope3
On Wednesday 07 December 2005 00:40, Jing Song wrote: But I'm having another trouble. We use ldap authentication to store the user information. How could that work with cookies to do login and logout? ls there any example or reference materials available? I am pretty new in this area, any information will be very much helpful. You really want to checkout the pluggable authentication utility in zope.app.authentication. There is also an ldap adapter package in the repository to connect to LDAP. And there should also be a working blugin for the pluggable authentication utility that uses LDAP. http://svn.zope.org/ldapadapter/trunk/ http://svn.zope.org/ldappas/trunk/ Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Fwd: [Zope3-Users] Problems building Zope3
I am forwarding this message to the zpkgtools mailing list, since this is not a pure Zope 3 problem. Since I am not a Windows user, I cannot answer the question. Regards, Stephan -- Forwarded Message -- Subject: [Zope3-Users] Problems building Zope3 Date: Tuesday 06 December 2005 04:21 From: John Poltorak [EMAIL PROTECTED] To: Zope3-users@zope.org Can anyone tell me what may have gone wrong here? /usr/bin/python.exe install.py -q build Traceback (most recent call last): File install.py, line 28, in ? context.initialize() File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/setup.py, line 83, in initialize self.scan(self._pkgname, pkgdir, self._pkgname) File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/setup.py, line 193, in scan self.scan_collection(name, directory, reldir) File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/setup.py, line 197, in scan_collection pkginfo = package.loadCollectionInfo(directory, reldir) File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/package.py, line 120, in loadCollectionInfo pkginfo = read_package_info(directory, reldir) File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/package.py, line 153, in read_package_info pkginfo, _ = cfgparser.loadConfigFile(get_schema(), f, url) File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/cfgparser.py, line 52, in loadSchemaCache schema = loader_factory().loadURL(path) File G:/ux2bs/workdir/Zope-3.1.0/Support/ZConfig/loader.py, line 63, in loadURL r = self.openResource(url) File G:/ux2bs/workdir/Zope-3.1.0/Support/ZConfig/loader.py, line 102, in openResource self._raise_open_error(url, str(e)) File G:/ux2bs/workdir/Zope-3.1.0/Support/ZConfig/loader.py, line 114, in _raise_open_error url) ZConfig.ConfigurationError: error opening file //G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/package.xml: [Errno ftp error] no host given make: *** [build] Error 1 Does this mean I need to specify hostname before building Zope3 ? -- John ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users --- -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Permission required for renaming?
On Wednesday 30 November 2005 16:16, Alec Munro wrote: My users are unable to rename things, seemingly everywhere. They can add, remove, but not rename, or cut/copy. I'm not sure how to set the permission for this. I think we need some more specific background information to help you out here. For example: Are those local or global users? Is this a specific container, or is it also true for a folder? ... Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Denying permissions for 'everybody' - which principals to use?
On Wednesday 16 November 2005 15:38, Jeff Shell wrote: Am I denying the right person here? Globally, the permission is set up as follows: {'permission': 'zope.View', 'role': 'zope.Anonymous', 'setting': PermissionSetting: Allow}, Should I Deny access to the zope.Anonymous role? Yeah, you need to deny all permissions to anonymous. Note that then anonymous cannot see any pages whatsoever, which is probably what you want. To the Everybody group? no, that's not necessary. To the Unauthenticated Group? You could do that, if you like. Right now, I only deny the principal: def denyUnauthenticated(self): Explicitly deny the view permissions for unauthenticated users. anybody = zapi.getUtility(IUnauthenticatedPrincipal).id pmanager = IPrincipalPermissionManager(self.context) for permission in self._view_permissions: pmanager.denyPermissionToPrincipal(permission, anybody) mmh, that should work though. The point of this simple 'sharing' interface is to let our customer have a press folder that they can restrict access to by allowing only limited people in to it. We're trying to keep the user interface as simple as possible. Yep, that's a noble/good goal. :-) Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Jeff Rush wrote: Frank Burkhardt wrote: On Tue, Dec 13, 2005 at 02:02:05PM +0100, Andreas Elvers wrote: what the rationale of @@ anyway ? I've searched for a definition for this in the Developer Handbook and elsewhere but it's hard to search for @@ and view. @@ marks a given path component explicitely as a view of the previous object. Example: http://zopeserver/contents.html Could mean either The object named 'contents.html' in the root folder or (if there is no such object) The 'contents.html' view (List of contained objects) of the root folder - the object is preferred. http://zopeserver/@@contents.html Will always display the list of contained objects of the root folder - no matter if there's a object 'contents.html' or not. Hmm, but the '@@' is optional, as I can leave it off and still get the contents.html view if there is no object named contents.html in that folder. This would seem to confuse developers, as if there IS an accidental collision of an item name with a view that is unknown to the developer, it will return the view out of nowhere. No, it will return the view. Shouldn't the '@@' should be *required* on views to avoid this ambiguity? This is a matter of policy. It is straightforward to change. Many people hate @@ and the ++view++name syntax. They will often arrange their item and view names so that they don't overlap. It might be nice to have easily-configured alternate policies. For example: - require @@, as you suggest - log a warning, or possible raise an error in development mode, if, when you get an item, you also find a view with the same name. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Permission required for renaming?
Thanks for the response. They are local users, and it's specific to every container type that I've created, I haven't had the chance to test with regular folders. The containers that I have inherit from OrderedContainer or BTreeContainer, and tend to be fairly minor customizations, simply adding a couple properties or methods. Hope that helps. I can do a little more testing tomorrow if you have any leads. Thanks again, Alec On 12/13/05, Stephan Richter [EMAIL PROTECTED] wrote: On Wednesday 30 November 2005 16:16, Alec Munro wrote: My users are unable to rename things, seemingly everywhere. They can add, remove, but not rename, or cut/copy. I'm not sure how to set the permission for this. I think we need some more specific background information to help you out here. For example: Are those local or global users? Is this a specific container, or is it also true for a folder? ... Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users