TOPIC_COUNT_SQL = """
SELECT COUNT(*)
FROM topics_topic
WHERE
topics_topic.object_id = maps_map.id AND
topics_topic.content_type_id = %s
"""
MEMBER_COUNT_SQL = """
SELECT COUNT(*)
FROM maps_map_members
WHERE maps_map_members.map_id = maps_map.id
"""
maps = maps.extra(select=SortedDict([
('member_count', MEMBER_COUNT_SQL),
('topic_count', TOPIC_COUNT_SQL),
]), select_params=(content_type.id,))
我不知道这个意思,
感谢