def shell(): from catalog import app, create create(CONFIG) with app.test_request_context('/'): app.preprocess_request() banner = 'Interactive Shell\n' try: from IPython import embed except ImportError: pass else: try: import sys if sys.platform == 'win32': import pyreadline except ImportError: banner = ('There is IPython installed on your system, ' 'but no pyreadline\n' + banner) else: embed(banner1=banner) return from code import interact interact(banner)
def CreateCatalog(self, request, context): logging.info("=========================[%s]", request.description) logging.info("=========================[%s]", request.name) return catalog.create(self.client, request.name, request.description, request.shared)
def CreateCatalog(self, request, context): return catalog.create(self.client, request.name, request.description)
def runserver(): from catalog import app, create create(CONFIG) app.debug = True app.run(host='0.0.0.0', port=8000)
def syncdb(): from catalog import db, models, create create(CONFIG) db.create_all()
def CreateCatalog(self, request, context): logging.info("=========================[%s]", request.description) logging.info("=========================[%s]", request.name) return catalog.create(self.client, context, request.name, request.description)