Re: [Zope3-Users] Problem with @@absolute_url

2007-04-30 Thread Darryl Cousins
Hi, On Mon, 2007-04-30 at 22:23 +0200, Maciej Wisniowski wrote: > > class StudentDetails: > > """Helper to return a student photo.""" > > def getPhoto(self): > > student = self.context > > return StudentPhoto(student) > > > > In my page template, I can see that the IImage

Re: [Zope3-Users] Problem with @@absolute_url

2007-04-30 Thread Greg Baker
On Monday 30 April 2007 17:46, Christophe Combelles wrote: > You should probably try to set the __parent__ of the adapter to the > __parent__ of the adapted object (or to the object itself) Thanks for the advice, Christophe. I tried both ways but neither worked for me. Still getting the 'not e

Re: [Zope3-Users] Problem with @@absolute_url

2007-04-30 Thread Maciej Wisniowski
> class StudentDetails: > """Helper to return a student photo.""" > def getPhoto(self): > student = self.context > return StudentPhoto(student) > > In my page template, I can see that the IImage object is being created > correctly.. > > > # > > > gives me . But to

Re: [Zope3-Users] Problem with @@absolute_url

2007-04-30 Thread Christophe Combelles
You should probably try to set the __parent__ of the adapter to the __parent__ of the adapted object (or to the object itself) Christophe Greg Baker a écrit : I have no idea how to get the absolute url of an adapted object, or even if its possible. If you can, please bear with me and I'll try

[Zope3-Users] Problem with @@absolute_url

2007-04-30 Thread Greg Baker
I have no idea how to get the absolute url of an adapted object, or even if its possible. If you can, please bear with me and I'll try to explain myself clearly. Consider this example (simple object and adapter): class IStudent: """Simple student object""" studentNumber = StudentNumber