开发者

pymongo.cursor.Cursor in a Django-template

Is it possible to iterate o开发者_运维问答ver an pymongo.cursor.Cursor object in a django-template?


Yes it's possible. Pymongo cursors implement the standard Python utterable methods, so you can iterate through a cursor's values using {% for element in cursor %}...{% endfor %} just as you would a list or other iterable sequence.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜