#!/usr/bin/env python # -*- encoding: utf-8 -*- import sys from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from flask.ext.sqlalchemy import get_debug_queries from sqlalchemy.exc import DatabaseError from esther import create_app, db, models from esther.tests import run_tests app = create_app(['esther.settings.site']) manager = Manager(app) @manager.command def server(toolbar=False, db_stats=False): app.debug = True if toolbar: try: from flask_debugtoolbar import DebugToolbarExtension except ImportError: pass else: DebugToolbarExtension(app) if db_stats: @app.after_request def print_db_stats(response): queries = get_debug_queries()
def create_app(self): return create_app(config_objects=['esther.settings.test'])
from esther import create_app application = create_app(['esther.settings.site'])
from esther import create_app application = create_app()
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from flask.ext.sqlalchemy import get_debug_queries from sqlalchemy.exc import DatabaseError from esther import create_app, db, models from esther.export import export_posts from esther.tests import run_tests app = create_app() manager = Manager(app) @manager.command def server(toolbar=False, db_stats=False): app.debug = True if toolbar: try: from flask_debugtoolbar import DebugToolbarExtension except ImportError: pass else: DebugToolbarExtension(app) if db_stats: @app.after_request
#!/usr/bin/env python # -*- encoding: utf-8 -*- import sys from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from flask.ext.sqlalchemy import get_debug_queries from sqlalchemy.exc import DatabaseError from esther import create_app, db, models from esther.tests import run_tests app = create_app(['esther.settings.site']) manager = Manager(app) @manager.command def server(toolbar=False, db_stats=False): app.debug = True if toolbar: try: from flask_debugtoolbar import DebugToolbarExtension except ImportError: pass else: DebugToolbarExtension(app) if db_stats: @app.after_request def print_db_stats(response):
def create_app(self): return create_app(['esther.settings.site', 'esther.settings.test'])
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from flask.ext.sqlalchemy import get_debug_queries from sqlalchemy.exc import DatabaseError from esther import create_app, db, models from esther.export import export_posts from esther.tests import run_tests app = create_app() manager = Manager(app) @manager.command def server(toolbar=False, db_stats=False): app.debug = True if toolbar: try: from flask_debugtoolbar import DebugToolbarExtension except ImportError: pass else: DebugToolbarExtension(app) if db_stats: @app.after_request def print_db_stats(response):
def create_app(self): return create_app(["esther.settings.site", "esther.settings.test"])