[Grok-dev] Re: About interfaces
Martijn Faassen
faassen at startifact.com
Tue Sep 18 16:29:43 EDT 2007
Hey,
Santiago Videla wrote:
[snip]
>
> client.py
>
> class Client(grok.Container ):
> implements(IPerson, IClient)
>
> Thie works fine.
>
> But I'm trying to use this:
> in interfaces.py
> class IClient(IPerson)
> ...
> in client.py
> class Client(grok.Container):
> implements(IClient)
>
> but when I try to edit a client instance i get this:
>
> File "/home/sancho/buildout-eggs/grok-0.10-py2.4.egg/grok/formlib.py",
> line 18, in success
> return self.success_handler(self.form, **data)
> File "/home/sancho/revoluciones/proyectos/sac/Sac/src/sac/client.py",
> line 109, in save
> self.applyData(self,**data)
> File
[...]
> TypeError: ('Could not adapt', <sac.client.EditClient object at
> 0x99de3ac>, <InterfaceClass sac.interfaces.IPerson>)
Can you show us this sac.client.EditClient class?
Regards,
Martijn
More information about the Grok-dev
mailing list