thank's a lot ! it work's
i had the class object to globals() for using the object when i load
my module
===
def add_a_table(tablename):
ClasseTable = DeclarativeMeta(Part_%s%tablename, (BaseTest,),
On 28 mai, 17:54, Michael Bayer mike...@zzzcomputing.com wrote:
sbard wrote:
hello,
i've got a database with one table per country.
for example :
part_es (for spain)
part_uk ()
part_it
each tables have got the same schema
(id, libel, description, part_numer)
you need to also specify the desired columns:
return DeclarativeMeta(%sMyBase%tablename, (BaseTest,), {
'__tablename__':tablename,
'id':Column('id', Integer, primary_key=True),
'stuff':Column('stuff', String(20))
})
sbard wrote:
sbard wrote:
hello,
i've got a database with one table per country.
for example :
part_es (for spain)
part_uk ()
part_it
each tables have got the same schema
(id, libel, description, part_numer)
same __init__ method
same __repr__ method
is there an easy way to avoid