From 07eebeaf80edd5169a6e62fc52cfa878908cd57d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 6 Jul 2011 08:18:31 -0400 Subject: [PATCH] manager --- manage.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 manage.py diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..2a206fd --- /dev/null +++ b/manage.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" + +dashboard manager +~~~~~~~~~~~~~~~~~ + +This module contains the management functionality. + +""" + +import os +import redi + +from flaskext.script import Manager + +from dash import app, g, redis_connect + + +manager = Manager(app) + +app.test_request_context('/').push() +redi.config.init(r=redis_connect()) + + +@manager.command +def clear_db(): + + r = redis_connect() + r.flushall() + + +@manager.command +def sync(): + pass + + +if __name__ == '__main__': + manager.run() \ No newline at end of file