On 24/01/2010 16:57, werner wrote:
...
Next thing is to make _get_translation reusable for different tables.
I got it down to this:
def _do_translation(bInstance, tTable, fCrit, cLang, dLang):
try:
x =
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of werner
Sent: 25 January 2010 13:37
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] dynamic_loader
On 24/01/2010 16:57, werner wrote:
...
Next thing is to make
Simon,
On 25/01/2010 15:18, King Simon-NFHD78 wrote:
...
I hope that helps,
Yes, that did help a lot.
This is my custom property class.
class TranslationProperty(object):
Returns a query enabled property
def __init__(self, tTable=None, fCol=None, cLang=None, dLang=None):
I am nearly there, at least I think so.
class Country_B(Base):
__table__ = sa.Table(u'countries_b', metadata,
sa.Column(u'id', sa.Integer(), sa.Sequence('countries_b_id'),
primary_key=True, nullable=False),
sa.Column(u'iso2', sa.String(length=2, convert_unicode=False)),
On Jan 24, 2010, at 8:02 AM, werner wrote:
I am nearly there, at least I think so.
class Country_B(Base):
__table__ = sa.Table(u'countries_b', metadata,
sa.Column(u'id', sa.Integer(), sa.Sequence('countries_b_id'),
primary_key=True, nullable=False),
sa.Column(u'iso2',
Michael,
On 24/01/2010 15:28, Michael Bayer wrote:
...
have you considered
http://www.sqlalchemy.org/docs/mappers.html#building-query-enabled-properties ?
No - had not found that.
Needed a bit to figure it out. I am using declarative and ended up with
this.
Michael, thanks a lot, I