>
> i'm playing (or trying to) around with sqlobject, and trying to create a
> class/obj, so that everytime the class is instantiated, a field in the class
> is set to a given value...
>
> is this possible?
>
> Do you mean something like this?

class Book(SQLObject):
    name=StringCol(length=20, default="Bruce")
    addr=StringCol(length=20, default="Earthlink")

Book.createTable(ifNotExists=True)
Book()
print Book.get(1).name


Happy New Year


Petr Jakes
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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