Python Django ORM brackets in query

Just start to learn django and have got an issue. I trying to use filter in my view but unfortunately it doesn't work.

This what I try to do:


It is a query which django generated :

"dashboard_sales"."date" BETWEEN 2019-01-01 AND 2030-01-01

The issue is django doesn't wrap date in brackets. So the correct query should has '2019-01-01' not just 2019-01-01. Does anybody nows how to fix it?

Thank you very much !

Back to Top