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
def get_target_metadata(): load_models() return db.metadata