Re: [Zope3-Users] Access to request in content object and object path in doctests

2007-01-25 Thread Maciej Wisniowski
> ) > > Ehm...? Ideas? OK, I forgot about: setup.setUpTraversal() Now it works with: >>> from zope.app.folder import rootFolder >>> from zope.traversing.api import getPath >>> root = rootFolder() >>> root['test_content'] = DBCrudContent() >>> test_content = root['test_content'] >>> getPath(root

Re: [Zope3-Users] view vs page confused

2007-01-25 Thread Alex Furlong
On Wed, Jan 24, 2007 at 08:31:52PM +0100, Dominique Lederer wrote: > > can someone explain me please when to use browser:view and when > > browser:page? >As far as I understand, the intended use of is to define >views that are accessible to browsers by using URLs. >The intended use of is to de

[Zope3-Users] Filtered Container

2007-01-25 Thread Alek Kowalczyk
Hi, I am looking for some filtering adapter for containers. You know, the object which can adapt an IMyContainer to another IMyFilteredContainer, listing only items which fall into some filter criteria. I thought it may be quite common pattern, but couldn't find any generic, already done solution -

Re: [Zope3-Users] Access to request in content object and object path in doctests

2007-01-25 Thread Maciej Wisniowski
> line 154, in getPath > raise TypeError("Not enough context to determine location root") > TypeError: Not enough context to determine location root I've added Contained as the base class of my content and it works now... uff... -- Maciej Wisniowski __

Re: [Zope3-Users] Access to request in content object and object path in doctests

2007-01-25 Thread Marius Gedminas
On Thu, Jan 25, 2007 at 08:44:43AM +0100, Maciej Wisniowski wrote: > > Yes. You're not supposed to do that. Views work with requests, not > > content objects. > > > > If you told us what you want to achieve, we could help you find a way to > > do it that works with Zope 3 rather than against it.

Re: [Zope3-Users] Filtered Container

2007-01-25 Thread Christian Theune
Am Donnerstag, den 25.01.2007, 08:37 + schrieb Alek Kowalczyk: > Hi, > I am looking for some filtering adapter for containers. You know, the object > which can adapt an IMyContainer to another IMyFilteredContainer, listing only > items which fall into some filter criteria. > I thought it may be

Re: [Zope3-Users] Using formlib schema.Choice with zc.table FieldColumn

2007-01-25 Thread ksmith93940-dev
Thanks for the direction, Gary. :) Getting a Choice field working in doctests was quite a challenge. It now fails as only as a zc.table FieldColumn. I'm including the relevant doctests and tests.py I apologize in advance for the verbose post. :) Kevin Smith File "/root/temp/zc.table-0.6/src

Re: [Zope3-Users] Using formlib schema.Choice with zc.table FieldColumn

2007-01-25 Thread ksmith93940-dev
Whoa, really bad line breaks, here is the pastbin link http://zope3.pastebin.com/867518 David, zc.table makes rendering html tables more programmatic. --- [EMAIL PROTECTED] wrote: > Thanks for the direction, Gary. :) > > Getting a Choice field working in doctests was quite > a > challenge. I

Re: [Zope3-Users] Using formlib schema.Choice with zc.table FieldColumn

2007-01-25 Thread Gary Poster
On Jan 25, 2007, at 6:09 PM, <[EMAIL PROTECTED]> [EMAIL PROTECTED]> wrote: Whoa, really bad line breaks, here is the pastbin link http://zope3.pastebin.com/867518 Thanks, Kevin. I've modified the test you wrote, made it pass, and committed it (revision 72232). The answer is that you ne