The web framework for perfectionists with deadlines.
Are you actually seeing incorrect results returned from the database? What do you think the problem is here? I'm having trouble understanding what the bug might be and the SQL looks correct to me.
Foundation unless otherwise noted. Django is a
trademark of the Django Software Foundation.