Add filter on database manage page

This commit is contained in:
Ruud
2014-02-12 21:14:06 +01:00
parent 061b79eac0
commit eb1556f3e8
3 changed files with 82 additions and 44 deletions
+4 -7
View File
@@ -21,13 +21,6 @@ class Database(object):
addEvent('database.setup_index', self.setupIndex)
def test():
time.sleep(1)
self.listDocuments()
addEvent('app.load', test)
def getDB(self):
if not self.db:
@@ -103,6 +96,10 @@ class Database(object):
for document in db.all('id'):
key = document.get('_t', 'unknown')
if kwargs.get('show') and key != kwargs.get('show'):
continue
if not results.get(key):
results[key] = []
results[key].append(document)