> Only one question left: Why is by_user_name() (in the example above
> "_by_user_name()") no
> normal method which can be overriden? How is this mechanism called? I would
> like to google
> a bit on this topic to understand Python's inner workings.
I guess the problem here is that SQLObject h
Oleg Broytmann schrieb:
> return super(User, self).by_user_name(user_name)
The problem is that I can't override the method by_user_name() so my custom
method will
never be called. Nevertheless, your corrections regarding the call to the super
method are
correct. Lee McFadden sent my a
On Thu, Dec 14, 2006 at 10:27:39PM +0300, Oleg Broytmann wrote:
>by_user_name is a method, so you have to call it:
>
> return super(User, self).by_user_name()
return super(User, self).by_user_name(user_name)
Oleg.
--
Oleg Broytmannhttp://phd.pp.ru/
On Thu, Dec 14, 2006 at 07:36:51PM +0100, Felix Schwarz wrote:
> I tried to override a query method (by_user_name)
What's the method? Do you mean byUserName?
> @classmethod
> def by_user_name(self, user_name):
> print "FELIX by_user_name(%s)" % user_name
> user_name = u
Hi,
I tried to override a query method (by_user_name) but that didn't work as expected (see
example attached). This is with Python 2.4.4 and SQLObject 0.7 on Fedora Core 6 (x86_64).
Is it possible at all? Any workarounds? Am I missing something?
fs
PS: I'm using SQLObject in a scenario where