当我运行以下查询时
Viewed.objects.raw('SELECT "recently_viewed_viewed"."id"FROM "recently_viewed_viewed" WHERE NOT ("recently_viewed_viewed"."viewed_date" <= \'timezone.now()\' AND "recently_viewed_viewed"."user_id" = user_id)' )
我明白了
DataError: invalid input syntax for type timestamp with time zone: "timezone.now()"
我一直在努力解决这个问题,无法弄清楚。任何帮助都将受到赞赏!