【发布时间】:2013-11-30 17:57:28
【问题描述】:
我尝试测试 GridFS,但无法通过: 我已将文件放入本地 gridfs。
$ mongofiles list
connected to: 127.0.0.1
IMGP2224.JPG 1125745
在我的代码中:
from pymongo import MongoClient
import gridfs
...
def index():
db = MongoClient('localhost', 27017).gridfs
files = gridfs.GridFS(db)
image = files.list()
import pdb;pdb.set_trace()
**pdb here gives empty []**
return render_template("index.html", images=image)
我做错了什么?
【问题讨论】: