Re: [Zope] Underscoring Inaugural Address
Dan Pozmanter wrote: Hey, I am working on a subversion interface for zope, and our repositories are rife with files like __init__.py. For something like that, I'd head for Zope 3... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] Underscoring Inaugural Address
Dan Pozmanter wrote: Is sort of do, since the final object is a wrapper around a unique path. What about messing aroound with the url? Is there a way to have it show: http://foo.com/__init__.py Maybe I missed something, but why are you intent on serving such bizare urls? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] Underscoring Inaugural Address
Is sort of do, since the final object is a wrapper around a unique path. What about messing aroound with the url? Is there a way to have it show: http://foo.com/__init__.py But really point to http://foo.com/supercoolfileat__init__.py ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Wednesday, May 11, 2005 3:56 PM To: zope@zope.org Subject: Re: [Zope] Underscoring Inaugural Address On Wed, May 11, 2005 at 03:50:00PM -0400, Dan Pozmanter wrote: Ugh. I suppose I could ignore the '_' bit (and override BaseRequest.traverse), but the problems are: 1. Keeping this thing synced with Zope. 2. Accessing the object being traversed to to ensure it is of the correct type. There is no other way to do this? Do you have to use URL traversal to reach the final object? There's no such restriction on query parameters. http://foo.com/get_file?name=__init__.py -- 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 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] Underscoring Inaugural Address
On Thu, May 12, 2005 at 10:52:03AM -0400, Dan Pozmanter wrote: Is sort of do, since the final object is a wrapper around a unique path. What about messing aroound with the url? Is there a way to have it show: http://foo.com/__init__.py But really point to http://foo.com/supercoolfileat__init__.py ? I don't know of an easy way to do that in zope alone, since the names beginning with underscore are blocked at a pretty low level (in ZPublisher). But, if you have e.g. apache in front, that could be easily done with a rewrite rule. -- 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] Underscoring Inaugural Address
--On Mittwoch, 11. Mai 2005 15:00 Uhr -0400 Dan Pozmanter [EMAIL PROTECTED] wrote: Is there a way to muck about with getattr, traversal, or something related so that, for a particular kind of object (eg with a particular attribute), Zope ignores the cannot start with a '_' rule? I think it is a bad idea trying to be tricky :-) I notice that the cvs.zope.org seems to transparently solve this problem, so presumably (if said interface is on a zope instance), this is solvable. cvs.zope.org does not run on Zope :-) -aj pgpE9319E8SAD.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 )
Re: [Zope] Underscoring Inaugural Address
Dan Pozmanter wrote: Hello there Zopatistas, In my inaugural post, I should like to enquire about getting to a url like so: http://myzopeserver.something.clever/a/path/to/a/file/named/__init__.py Getting to the object __init__.py is difficult (it acts like it doesn't exist.) Is there a way to muck about with getattr, traversal, or something related so that, for a particular kind of object (eg with a particular attribute), Zope ignores the cannot start with a '_' rule? I notice that the cvs.zope.org seems to transparently solve this problem, so presumably (if said interface is on a zope instance), this is solvable. Probably, but it would be difficult. I don't even know enough about screwing with traversal to advise. By file what exactly do you mean? I wonder if LocalFS deals with this problem? If it allows _filenames, perhaps you can stead something from there. --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 )
Re: [Zope] Underscoring Inaugural Address
On Wed, May 11, 2005 at 03:00:02PM -0400, Dan Pozmanter wrote: Hello there Zopatistas, In my inaugural post, I should like to enquire about getting to a url like so: http://myzopeserver.something.clever/a/path/to/a/file/named/__init__.py Getting to the object __init__.py is difficult (it acts like it doesn't exist.) Objects whose names begin with underscores are not publishable. The code is in lib/python/ZPublisher/BaseRequest.py and there is no easy way to override this behavior. -- 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] Underscoring Inaugural Address
Ugh. I suppose I could ignore the '_' bit (and override BaseRequest.traverse), but the problems are: 1. Keeping this thing synced with Zope. 2. Accessing the object being traversed to to ensure it is of the correct type. There is no other way to do this? Is there a way to have a path pretend it is different? Could messing with __browser_default__ yield any useful results? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Wednesday, May 11, 2005 3:45 PM To: zope@zope.org Subject: Re: [Zope] Underscoring Inaugural Address On Wed, May 11, 2005 at 03:00:02PM -0400, Dan Pozmanter wrote: Hello there Zopatistas, In my inaugural post, I should like to enquire about getting to a url like so: http://myzopeserver.something.clever/a/path/to/a/file/named/__init__.p y Getting to the object __init__.py is difficult (it acts like it doesn't exist.) Objects whose names begin with underscores are not publishable. The code is in lib/python/ZPublisher/BaseRequest.py and there is no easy way to override this behavior. -- 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 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] Underscoring Inaugural Address
On Wed, May 11, 2005 at 03:50:00PM -0400, Dan Pozmanter wrote: Ugh. I suppose I could ignore the '_' bit (and override BaseRequest.traverse), but the problems are: 1. Keeping this thing synced with Zope. 2. Accessing the object being traversed to to ensure it is of the correct type. There is no other way to do this? Do you have to use URL traversal to reach the final object? There's no such restriction on query parameters. http://foo.com/get_file?name=__init__.py -- 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 )