Hi,
I am trying to use validates() to dynamically add validation to my sqla
classes, but i cannot figure out how to do this. I have read python
decorator docs and docs n validates, but something escapes me (or it is
just not possible).
A code snippet (this does not work):
def
On Thursday, January 3, 2013 10:08:19 PM UTC-5, ocicat wrote:
Embarrassingly, I'm gotten lost in calling SQL functions in SQLAlchemy
0.7.1.
I can boil the problem down to the following table structure:
CREATE TABLE words (
id INTEGER NOT NULL,
timestamp DATETIME NOT
On Jan 3, 2013, at 10:18 PM, Ken Lareau wrote:
I recently (today) ran into an issue that has me perplexed as to how to
resolve it,
so I'm asking here to see if anyone can shed some insight. Hopefully I can
ex-
plain it clearly enough to make me not sound completely incompetent...
I
Would need much more detail here including a full stack trace, what line you're
referring to in _flush(), and preferably code which reproduces the error you're
seeing.
On Jan 4, 2013, at 1:55 AM, Gurjar, Unmesh wrote:
Hi,
I have installed SQLAlchemy 0.7.9 (backend – MySQL, Python 2.7). I
@validates is a decorator that's typically associated with a class before it's
mapped. It is essentially a mapper-time directive which is converted into an
attribute event.
If you're trying to associate these events with class attributes en-masse, and
particularly that may already be mapped,
On 4 Jan 2013, at 03:08, James Hartley jjhart...@gmail.com wrote:
Embarrassingly, I'm gotten lost in calling SQL functions in SQLAlchemy 0.7.1.
I can boil the problem down to the following table structure:
CREATE TABLE words (
id INTEGER NOT NULL,
timestamp DATETIME NOT
Perfect (almost ;-), thanks a lot!
for future reference, the attribute name (key) was needed
in create_validator(cls) to access the correct validate method:
@staticmethod
def _create_validator(key, cls):
def validate(target, value, oldvalue, initiator):