阅读背景:

如何从Django数据库中检索行数据作为列表?

来源:互联网 

I would like to retrieve the data in my Django database table rows as a list so I can iterate over it and write each value of the list to an Excel spreadsheet. I tried doing this using dictionaries but dictionaries are not ordered in Python so my columns were getting all out of order. I need my Excel spreadsheet to look the same as my database table, not scrambled around in random order. How can I achieve this? I would like to retrieve the data in my Django




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: