参考链接:https://docs.djangoproject.com/en/2.0/topics/db/sql/#executing-custom-sql-directly
def dictfetchall(self):
desc = self.cursor.description
return [
dict(zip([col[0] for col in desc], row))
for row in self.cursor.fetchall()
]