Re: [sqlalchemy] Can `sqlalchemy.orm.validates` be set on multiple attributes?

2021-10-01 Thread Mike Bayer
sure it's just a setter, it seems like you are passing "start_time_local" to your constructor, the ORM does not automatically add hybrid properties to the constructor so you would need to imlpement the __init__ method manually. On Fri, Oct 1, 2021, at 5:04 PM, niuji...@gmail.com wrote: > > Hi M

Re: [sqlalchemy] Can `sqlalchemy.orm.validates` be set on multiple attributes?

2021-10-01 Thread niuji...@gmail.com
Hi Mike, Instead of this: class Entity: def set_timestamp(self, timestamp, timezone): # ... which you have to manually call it to set, I'd like to have an automated setting directly on initiation, so that I can create new records in a more uniformed ways: Entity(**params_from_web_fo

Re: [sqlalchemy] Can `sqlalchemy.orm.validates` be set on multiple attributes?

2021-09-04 Thread Mike Bayer
On Fri, Sep 3, 2021, at 4:07 PM, niuji...@gmail.com wrote: > In the official documentation it says: > > > *validates* > (*names, > **kw) > > > Decorate a method as a ‘validator’ for one or more named prop

[sqlalchemy] Can `sqlalchemy.orm.validates` be set on multiple attributes?

2021-09-03 Thread niuji...@gmail.com
In the official documentation it says: validates (*names, **kw) Decorate a method as a ‘validator’ for one or more named properties. I need to validate two incoming *-**attributes at the same time, for