I have a Django queryset that I prepare with queryset.filter(date__gte=datetime(2011,1,1))
If I then call `str(queryset.query)` I see this in the string: ... WHERE "App_table"."date" >= 2011-1-1 However, this is invalid SQL code as if I run this in Postgresql I get this error: ... WHERE "App_table"."date" >= 2011-1-1 ERROR: operator does not exist: date >= integer HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. Why is this happening and how can I ask Django to output proper SQL code that I can work on? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3f7a7f2d-2e3d-4167-8b77-2b1c7da5446d%40googlegroups.com.