Collection choice possible problem

12 views
Skip to first unread message

Voltron

unread,
Mar 15, 2012, 2:54:49 AM3/15/12
to Humongolus
class CollectionChoice(Choice):
_db = None
_collection = None
_render = None
_fields = None
_query = {}
_sort = {}

def get_choices(self, render=None):
if render:
print self._db
print self._collection
cur = self._conn[self._db]
[self._collection].find(self._query, fields=self._fields)
cur = cur.sort(self._sort) if self._sort else cur
return [render(i) for i in cur]
else: raise FieldException("no render method available")


The prints in the CollectionVhoice field type should be logs, or maybe
removed entirely

Christopher Coté

unread,
Mar 15, 2012, 11:41:09 AM3/15/12
to humon...@googlegroups.com
noted, sorry some debugging stuff got left in.
Reply all
Reply to author
Forward
0 new messages