print(queryset.query)
}}}
// result would be
{{{
SELECT `school`.`school_name` AS `location_name` FROM `form_data_values`
WHERE ( `form_data`.`testing_cycle` = BL)
}}}
The result has a small issue, look at the value ("BL") that is being
filtered, It is string so there should have been single quotes around it.
Many of occasions, I just paste the generated SQL in the MySQL editor but
in order to run the whole SQL syntax I need to add quotes around the
string values. This becomes a big issues with the complex sql.
--
Ticket URL: <https://code.djangoproject.com/ticket/33451>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: (none) => nobody
* resolution: => duplicate
* status: new => closed
* component: Error reporting => Database layer (models, ORM)
Comment:
Duplicate of #25705.
--
Ticket URL: <https://code.djangoproject.com/ticket/33451#comment:1>