Hello,
I am using Sqlalchemy under Turbogears and I'd like to know which is the
best way to customize column to string conversion of a DateTime column. I
need to do it in an automatic way instead having to format it before
showing.
Regards
--
You received this message because you are
The question is probably very simple, but I can't find an answer anywhere...
Suppose I already have some tables declarad in a declarative way, as
below, how do I create the database schema from them?
I usually always did with the
meta.create_all() after defining the various Table('name', meta...)
On Tue, Aug 21, 2012 at 5:25 PM, andrea crotti
andrea.crott...@gmail.com wrote:
The question is probably very simple, but I can't find an answer anywhere...
Suppose I already have some tables declarad in a declarative way, as
below, how do I create the database schema from them?
I usually
2012/8/21 Simon King si...@simonking.org.uk:
The MetaData instance is available via the declarative base class, so
you should be able to do something like:
Base.metadata.create_all()
http://docs.sqlalchemy.org/en/rel_0_7/orm/extensions/declarative.html#accessing-the-metadata
Hope that
On Aug 21, 2012, at 12:50 PM, andrea crotti wrote:
2012/8/21 Simon King si...@simonking.org.uk:
The MetaData instance is available via the declarative base class, so
you should be able to do something like:
Base.metadata.create_all()
To give an example I have I have two classes that have the same name, but
belong to different modules. there is an accounts.py that has a class
Account(Base), and a testing.py that has a class Account(Base).
When I try to set this up I get warnings:
The classname 'Account' is already in the
Hi all,
I've asked this question on stackoverflow:
http://stackoverflow.com/questions/12031861/sqlalchemy-how-do-i-get-an-object-from-a-relationship-by-objects-pk/12032405
Basically, I'm looking for a dict-like access to a relationship to be able
to quickly retrieve items by some key (item's
Good to hear, thanks!
On Tuesday, August 21, 2012 5:19:49 PM UTC-4, Michael Bayer wrote:
On Aug 21, 2012, at 4:36 PM, jers wrote:
To give an example I have I have two classes that have the same name, but
belong to different modules. there is an accounts.py that has a class
Hi
I have created a simple update like this on a PG database via PG8000;
table=Table('invoice_line_items', meta, autoload=True)
query = table.update()
query = query.where(and_(eq(table.c.InvBook, 'SC'), eq(table.c.InvNum,
12862), eq(table.c.InvLine, 1)))
query = query.values(**data)
Hi Michael and all
I successfully built a all nodes relationship following your guidelines.
As:
subq1=select([caso_vinculo.c.caso_1_id.label('id1'),caso_vinculo.c.caso_2_id.label('id2')]).union(select([caso_vinculo.c.caso_2_id,
caso_vinculo.c.caso_1_id]))
subq2=aliased(subq1)
CasoMapper
Thanks. The subquery approach works fine.
My class is named 'Caso' (Case, in english)
I included at the mapper:
subq2=aliased(subq1)
CasoMapper = mapper(Caso, caso, properties=
{
'LinkedNodes':relation(Caso, secondary=subq2,
On Aug 21, 2012, at 5:47 PM, Sergey V. wrote:
Hi all,
I've asked this question on stackoverflow:
http://stackoverflow.com/questions/12031861/sqlalchemy-how-do-i-get-an-object-from-a-relationship-by-objects-pk/12032405
Basically, I'm looking for a dict-like access to a relationship to be
On Aug 21, 2012, at 6:32 PM, Warwick Prince wrote:
Hi
I have created a simple update like this on a PG database via PG8000;
table=Table('invoice_line_items', meta, autoload=True)
query = table.update()
query = query.where(and_(eq(table.c.InvBook, 'SC'), eq(table.c.InvNum,
12862),
13 matches
Mail list logo