def handle_app(self, app, **options): buf = StringIO() def buffer_output(s, p=""): return buf.write(s + p) engine = create_engine(settings.DJANGO_SQLALCHEMY_DBURI, strategy="mock", executor=buffer_output) metadata.create_all(engine, tables=[m.__table__ for m in get_models(app)]) print buf.getvalue()
def handle_noargs(self, **options): metadata.create_all()