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
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
> 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
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
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