In a legacy MySQL database I have a table with a field that is a comma-separated list of values:
id | field
---------------
1 | 2,4,8
2 | 1,4,15,24
What is the Django equivalent of the following query?
SELECT * FROM `table_name` WHERE FIND_IN_SET(15, field)
Assume Django sees this field as a regular CharField.
For stuff that’s that custom i think you may be stuck with extra()
Example: