Added CLI command for moving top-level nodes between projects.

Also introduces a slightly nicer way to get the database interface, and
an object-oriented way to allow dependency injection.
This commit is contained in:
2016-09-27 12:16:27 +02:00
parent c64fbf61ba
commit 407aefb9ad
8 changed files with 401 additions and 1 deletions

View File

@@ -509,3 +509,11 @@ class PillarServer(Eve):
links.sort(key=lambda t: len(t[0]) + 100 * ('/api/' in t[0]))
pprint(links)
def db(self):
"""Returns the MongoDB database.
:rtype: flask_pymongo.PyMongo
"""
return self.data.driver.db