[Zope-dev] Re: Zope 3 Views for Errors

2006-11-11 Thread Philipp von Weitershausen

Sidnei da Silva wrote:

I was wondering why there is no easy way to register a view for an
exception in Zope 2 yet (not even in Zope 2.10!).


Because nobody has refactored Zope 2 to support this yet...


There is a product in the z3-base called FiveException:

http://codespeak.net/svn/z3/FiveException/trunk/

It basically replaces zpublisher_exception_hook to get a view called.
I would like to change zpublisher_exception_hook in Zope 2.10 and up
to lookup a view for the exception there and get rid of this ugly
patch.


+1 for Zope 2 trunk. -1 for 2.10, it's feature-frozen.


--
http://worldcookery.com -- Professional Zope documentation and training
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Windows Installer Nice-to-have

2006-11-11 Thread Philipp von Weitershausen

Chris Withers wrote:
I don't know how easy this is to do, but one thing that would be 
_really_ nice would be to use an existing compatible python install 
rather than Zope splatting it's own in regardless.


-1

That's what Zope 3 does (it's a standard distutils installer). It makes 
it hard to install several Zope 3 versions at the same time. Or perhaps 
that's just because it install itself into site-packages?


Anyway, I would rather see the Zope installer to be self-contained wrt 
Python. In fact, I also wish that the Zope 2 and 3 installers were the 
same so that we'd only have to maintain and support one installation 
scheme. I don't particularly care about the paths. I think the 
politically correct destination is Program Files, though it is quite 
annoying for the shell due to the space.



--
http://worldcookery.com -- Professional Zope documentation and training
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 9 OK

2006-11-11 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Fri Nov 10 11:00:00 2006 UTC to Sat Nov 11 11:00:00 2006 UTC.
There were 9 messages: 9 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2.6 Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Fri Nov 10 21:27:25 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006530.html

Subject: OK : Zope-2.6 Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Nov 10 21:28:55 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006531.html

Subject: OK : Zope-2.7 Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Nov 10 21:30:25 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006532.html

Subject: OK : Zope-2.7 Python-2.4.3 : Linux
From: Zope Unit Tests
Date: Fri Nov 10 21:31:55 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006533.html

Subject: OK : Zope-2.8 Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Nov 10 21:33:26 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006534.html

Subject: OK : Zope-2.8 Python-2.4.3 : Linux
From: Zope Unit Tests
Date: Fri Nov 10 21:34:56 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006535.html

Subject: OK : Zope-2.9 Python-2.4.3 : Linux
From: Zope Unit Tests
Date: Fri Nov 10 21:36:26 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006536.html

Subject: OK : Zope-2.10 Python-2.4.3 : Linux
From: Zope Unit Tests
Date: Fri Nov 10 21:37:56 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006537.html

Subject: OK : Zope-trunk Python-2.4.3 : Linux
From: Zope Unit Tests
Date: Fri Nov 10 21:39:27 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006538.html

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope] Restricted Traverse

2006-11-11 Thread Nancy Donnelly
Could someone tell me what's wrong with this code?span tal:define="global url python:here.absolute_url(relative=None) + '/index_frame.pt#quotes'"/span tal:define="root python:container.restrictedTraverse(url)" tal:replace="structure python:here.printSiteMap(root, 12)"/--or--span tal:define="root python:container.restrictedTraverse(here.absolute_url(relative=None) + '/index_frame.pt#quotes')" tal:replace="structure python:here.printSiteMap(root, 12)"/I'm trying to automate that restrictedTraverse.TIA,Nancy___
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] Restricted Traverse

2006-11-11 Thread Andrew Milton
+---[ Nancy Donnelly ]--
| Could someone tell me what's wrong with this code?
| 
| span
| tal:define=global url python:here.absolute_url(relative=None) + '/
| index_frame.pt#quotes'
| /
| span
| tal:define=root python:container.restrictedTraverse(url)
| tal:replace=structure python:here.printSiteMap(root, 12)
| /
| 
| --or--
| 
| span
| tal:define=root python:container.restrictedTraverse(here.absolute_url
| (relative=None) + '/index_frame.pt#quotes')
| tal:replace=structure python:here.printSiteMap(root, 12)
| /
| 
| 
| I'm trying to automate that restrictedTraverse.

absolute url returns a string prefixed with http(s)://, unless the relative
parameter evaluates to true None doesn't do that.

Try using relative = True


-- 
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] Restricted Traverse

2006-11-11 Thread Nancy Donnelly
- Original Message From: Andrew Milton [EMAIL PROTECTED] absolute url returns a string prefixed with "http(s)://", unless the relative parameter evaluates to true None doesn't do that. Try using relative = TrueYou mean like this?span tal:define="global url python:here.absolute_url(relative=True) + '/index_frame.pt#quotes'"/span tal:define="root python:container.restrictedTraverse(url)" tal:replace="structure python:here.printSiteMap(root, 12)"/It didn't like that
 either :(Another idea?TIA,Nancy-- 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 )


[Zope] [Plone-Users] Killing the Postmaster

2006-11-11 Thread Nancy Donnelly
- Original Message From: Alexander Limi [EMAIL PROTECTED] Plone 2.1.4 works fine on Zope 2.7.8.Will I run into all sorts of upgrade issues??TIA,Nancy___
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] Mail Boxer on Qmail

2006-11-11 Thread Nancy Donnelly
Hi;I'm running into trouble getting Mail Boxer to play nicely with qMail. I've installed and tested Maildrop Host. It works ok, so that potential bug is eliminated. I was confused as to where to put smtp2zope.py, so I put it here: /usr/bin/smtp2zope.py and symlinked it here: /usr/local/sbin/smtp2zope.py /var/qmail/bin/smtp2zope.pyjust to be safe ;)One of the how-to's I read said I should create the following file: /var/qmail/aliases/.qmail-foowhere "foo" is the name of my list, and enter the following line by itself: foo: "|smtp2zope.py http://127.0.0.1:8080/foo/mailinglist/manage_mailboxer
 2"where the second "foo/mailinglist" is my path to the Mail Boxer instance.and finally I send a message to [EMAIL PROTECTED] but I didn't get anything back.Did I get subscribed? How do I know? I don't see any entry in the "maillist" in the properties tab.Also, one of the how-to's said I should set up a forwarding email address. That's not necessary, is it?TIA,Nancy___
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] Restricted Traverse

2006-11-11 Thread Andrew Milton
+---[ Nancy Donnelly ]--
| - Original Message 
| From: Andrew Milton [EMAIL PROTECTED]
| 
|  absolute url returns a string prefixed with http(s)://, unless the 
relative
|  parameter evaluates to true None doesn't do that.
| 
|  Try using relative = True
| 
| You mean like this?
| 
| span
| tal:define=global url python:here.absolute_url(relative=True) + '/
| index_frame.pt#quotes'
| /
| span
| tal:define=root python:container.restrictedTraverse(url)
| tal:replace=structure python:here.printSiteMap(root, 12)
| /
| 
| It didn't like that either :(

Try removing the 'anchor' (#quotes), since you dont have an object called
'index_frame.pt#quotes', do you ?

Do you have any more information? 
Like error messages? The value that url evaluates to?

-- 
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: Can't Track Simple Bug

2006-11-11 Thread Paul Winkler
On Fri, Nov 10, 2006 at 11:01:26PM -0800, Nancy Donnelly wrote:
 75From: Tres Seaver [EMAIL PROTECTED]
 
  The script you are using to start Zope with looks like it must be
  'zctl', the ancient precursor to the current 'zopectl':  it 'execed' its
  Python config file (which is what you have here).  That version was
  never shipped with Zope, and has not been in active use by its authors
  (I'm one of them) for more than three years now.
  
 
 Hmm. Okay. I took over this box recently. So, how do I change things? Here's 
 my current zopectl:

Have a look at the configuration section of the zope book:
http://www.plope.com/Books/2_7Edition/InstallingZope.stx#1-13

But since your instance has some old-style gunk you'll
want to make sure you get the new-style scripts and config files
in place. To do that, the easiest thing is probably:

- shut down zope.
- make a backup copy of your existing instance.
- delete all files in INSTANCE_HOME/etc and INSTANCE_HOME/bin
  (you did make that backup right??)
- go to your ZOPE_HOME, /usr/local/zope/278
- run ./bin/mkzopeinstance.py
- follow the prompts. When it asks for Directory,
  give your full INSTANCE_HOME path.
- Edit INSTANCE_HOME/etc/zope.conf.
  There will be lots of comments in there explaining
  the various directives. Hopefully you can figure
  out how the various things in your old zope.conf
  translate to the new format.

-- 

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] Restricted Traverse

2006-11-11 Thread Paul Winkler
On Sun, Nov 12, 2006 at 12:57:21AM +1100, Andrew Milton wrote:
 +---[ Nancy Donnelly ]--
 | Could someone tell me what's wrong with this code?
 | 
 | span
 | tal:define=global url python:here.absolute_url(relative=None) + '/
 | index_frame.pt#quotes'
 | /
 | span
 | tal:define=root python:container.restrictedTraverse(url)
 | tal:replace=structure python:here.printSiteMap(root, 12)
 | /
 | 
 | --or--
 | 
 | span
 | tal:define=root python:container.restrictedTraverse(here.absolute_url
 | (relative=None) + '/index_frame.pt#quotes')
 | tal:replace=structure python:here.printSiteMap(root, 12)
 | /
 | 
 | 
 | I'm trying to automate that restrictedTraverse.
 
 absolute url returns a string prefixed with http(s)://, unless the relative
 parameter evaluates to true None doesn't do that.
 
 Try using relative = True

Aside from that, and the problem with '#quotes' as Andrew pointed out,
absolute_url() is just not safe to use with restrictedTraverse(), since
the url takes virtual hosting into account and thus may add or remove
parts of the path.  This technique tends to work fine during local
development and then as soon as you deploy to a server with virtual
hosting configured, boom, everything breaks. No fun.
So, Don't Do That.
See http://www.plope.com/Books/2_7Edition/AppendixB.stx#2-394

When creating paths for use with restrictedTraverse(),
you should always use getPhysicalPath() instead.

In this particular case, I suspect you don't even need to do that.
Try:

 tal:define=root python:here.restrictedTraverse('index_frame.pt')

which can be spelled a bit more simply as:

 tal:define=root nocall:here/index_frame.pt


-- 

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 )