On Dec 7, 2006, at 3:25 PM, Ed Singleton wrote:
>
> Yes that did it. I had to do a log.debug(dir(self.index)) to be
> really sure that you meant self.index.im_func as I'd never heard of
> im_func before.
You did well, no one should believe my examples as I'm an expert at
introducing typos... :)
im_func is the unbound version of a bound method:
In [1]: from new import instancemethod
In [2]: def foo(self):
...: print self.msg
...:
...:
In [3]: class Test(object):
...: def __init__(self):
...: self.foo = instancemethod(foo, self, self.__class__)
...: self.msg = "Hello world"
...:
...:
In [4]: t = Test()
In [5]: t.foo()
Hello world
In [6]: t.foo.im_func is foo
Out[6]: True
In [7]: t.foo is foo
Out[7]: False
>
> The solution below works fine except for the redirect to the thank you
> page. I have to stop now but I'll play some more tomorrow. I'll
> probably fix it by adapting Matthew's single form controller so that
> there isn't a redirect.
What's the url being generated? you might need to put the full path
or '../thank_you' (mmmm, how I like Route's "url_for"... ;)
Alberto
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---