there is a requirement that there is a city field in the MySQL table, and there are 200 cities under that field. Each time, 10 cities are extracted from this field in turn, such as the first 10 cities in the first extraction, 11 ~ 20 in the second extraction, 21 ~ 30 in the third extraction, and then the first one after the 200th extraction. 10 cities are extracted each time to link up the cycle. You cannot use the ID of the field to extract, because cities are often added or deleted. The number of ID does not represent the number of cities. For example, if you delete 100 cities, there are still 200 cities left, but the ID is already 300.
I don"t know how to write it with Django"s ORM. Ask for advice.