Answer the question
In order to leave comments, you need to log in
Why is the filter for select query not working correctly in SQLAlchemy (Flask)?
There is a request...
User.query.filter((datetime.datetime.now()-User.latest_active)<datetime.timedelta(minutes=1)).count()
user = User.query.filter_by(id=2).first()
print((datetime.datetime.now()-user.latest_active)<datetime.timedelta(minutes=1))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question