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.
精彩评论