27 Nov
2001
27 Nov
'01
9:10 p.m.
Douwe Osinga writes:
.... 05 return context[propname]() .... Now, if I pass 'absolute_url' as propname, this works as a dream. But if I pass getParent, a method I created in the base class of the object where context was derived from, the thing crashes with 'Resource not found'. You mix attribute access syntax and subscription syntax.
I do not know why it works for "absolute_url" but it is not a good idea in general. Try: "getattr(context,propname)()" Dieter