def create_app(self): app = create_web_app(**{ 'DEBUG': True, 'TESTING': True, 'SQLALCHEMY_DATABASE_URI': 'sqlite:///:memory:' }) return app
def create_app(self): app = create_web_app(**{ 'DEBUG': True, 'TESTING': True, 'SQLALCHEMY_DATABASE_URI': 'postgresql://*****:*****@localhost/openspending_testing', 'CELERY_ALWAYS_EAGER': True, 'UPLOADS_DEFAULT_DEST': tempfile.mkdtemp(), 'LOCKDOWNUSER': '******', 'LOCKDOWNPASSWORD': '******', 'LOCKDOWN_FORCE': True }) return app
def create_app(self): app = create_web_app(**{ 'DEBUG': True, 'TESTING': True, 'SQLALCHEMY_DATABASE_URI': 'postgresql://*****:*****@localhost/openspending_testing', 'CELERY_ALWAYS_EAGER': True, 'UPLOADS_DEFAULT_DEST': tempfile.mkdtemp(), 'LOCKDOWNUSER': '******', 'LOCKDOWNPASSWORD': '******', 'LOCKDOWN_FORCE': True, 'CSRF_DISABLE': True }) return app
''' Interface to common administrative tasks for OpenSpending. ''' import logging from flask.ext.script import Manager #from flask.ext.assets import ManageAssets from openspending.core import create_web_app from openspending.command import user, db, importer, dbimport, search, geometry, assets log = logging.getLogger(__name__.split('.')[0]) app = create_web_app() with app.app_context(): manager = Manager(app, description=__doc__) manager.add_option('-v', '--verbose', dest='verbose', action='append_const', const=1, help='Increase the logging level') manager.add_option('-q', '--quiet', dest='verbose', action='append_const', const=-1, help='Decrease the logging level') manager.add_command('user', user.manager) manager.add_command('search', search.manager)
''' Interface to common administrative tasks for OpenSpending. ''' import logging from flask.ext.script import Manager #from flask.ext.assets import ManageAssets from openspending.core import create_web_app from openspending.command import user, db, importer, dbimport, search, geometry, assets log = logging.getLogger(__name__.split('.')[0]) app = create_web_app() with app.app_context(): manager = Manager(app, description=__doc__) manager.add_option('-v', '--verbose', dest='verbose', action='append_const', const=1, help='Increase the logging level') manager.add_option('-q', '--quiet', dest='verbose', action='append_const', const=-1, help='Decrease the logging level') manager.add_command('user', user.manager) manager.add_command('search', search.manager) manager.add_command('geometry', geometry.manager) manager.add_command('db', db.manager) manager.add_command('assets', assets.manager) #app.jinja_env.assets_environment.environment = app.jinja_env.assets_environment #manager.add_command('assets', ManageAssets(app.jinja_env.assets_environment))