i really apologize for asking again, but i cannot make it work.
i need it to be a drop-in-replacement, so i dont have to go to each place
and adapt the expression.
what i have right now is:

@classmethod
    def select(cls, clause=None, **kw):
        sresult = SQLObject.select(cls, clause, **kw)
        return sresult.filter(~ LIKE(Reisen.q.REISENR, "BUS%"))

but no matter what i try, it always produces errors.

Can you help me once more?

Thanks





On Jan 17, 2008 6:02 PM, Oleg Broytmann <[EMAIL PROTECTED]> wrote:

> On Thu, Jan 17, 2008 at 05:44:03PM +0100, Frank Wagner wrote:
> > really sorry to ask once more. when i now try using this, i get:
> > TypeError: select() takes exactly 1 argument (2 given)
> >
> > you know why?
>
>   The problem, I think, is in the declaration
>
> > >    def select(cls, **kw):
>
>   Now Python expects you pass a lot of keywords to .select(), when you
> probably only pass "clause" without naming it. See the declaration of
> .select() in main.py:
>
>    def select(cls, clause=None, clauseTables=None,
>               orderBy=NoDefault, limit=None,
>               lazyColumns=False, reversed=False,
>               distinct=False, connection=None,
>               join=None, forUpdate=False):
>
>   Either you call your .select() as Reisen.select(clause=...) or
> redeclare it as
>
>   def select(cls, clause=None, **kw):
>
>   Don't forget to pass the clause to SQLObject.select().
>
> Oleg.
> --
>     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
>           Programmers don't die, they just GOSUB without RETURN.
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to