Exemplo n.º 1
0
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)
Exemplo n.º 3
0
 def CreateCatalog(self, request, context):
     return catalog.create(self.client, request.name, request.description)
Exemplo n.º 4
0
def runserver():
    from catalog import app, create
    create(CONFIG)
    app.debug = True
    app.run(host='0.0.0.0', port=8000)
Exemplo n.º 5
0
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)