date filtering in with __gte does not add apostrophe

13 views
Skip to first unread message

safhac

unread,
Jun 29, 2021, 8:35:23 AM6/29/21
to Django users
when filtering using __gte on models.DateTimeField the printed query doesn't wrap the searched date with an apostrophe ' this may lead to undesired results in postgres database:

WHERE ("appname_tablename"."creation_date" >= 2021-06-27 11:08:29.311284+00:00 AND "appname_tablename"."node_id" = 111)

as asked on SO here

 please inform if this is a bug, the behavior has been reported or fixed
Reply all
Reply to author
Forward
0 new messages