Example #1
0
def make_shell_context():
    from squash.extensions import db
    from squash import load_models

    load_models()
    context = {}
    context['app'] = current_app
    context['db'] = db
    context.update(db.Model._decl_class_registry)

    return context
Example #2
0
def get_target_metadata():
    load_models()
    return db.metadata