Hi,

I want to retrieve all the people who are born at today's date. I'm using Flask 
with sqlalchemy;

class Member(db.Model):
>
...

dateofbirth = Column(Date)
...


In my view.py;

> from datetime import date, timedelta 
>
today = date.today() 
>
members_today = Member.query.filter(Member.dateofbirth.replace(year=today.year) 
== today).all()
>
>
But I receive this error;

> AttributeError: Neither 'InstrumentedAttribute' object nor 'Comparator' 
> object associated with Member.dateofbirth has an attribute 'replace' 
>

Anyone has an idea?

Thanks 

 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to