最佳答案
I'm having trouble figuring out how to do a "greater than or equal to" comparison in a query.
I have a model field:
invoicedate = db.Column(db.Date(), nullable=True, key='InvoiceDate')
And i'm trying to do the following filter:
Invoice.query.filter_by(invoicedate >= date.today()).count()
When I run the view, it keeps throwing the following error:
NameError: global name 'invoicedate' is not defined
What is the correct syntax for a greater than or equal filter in sqlalchemy or flask-sqlalchemy?