Пример #1
0
def databases():
    """ Show a list of databases this web frontend is serving """
    databases = list(models.get_databases().itervalues())
    databases.sort(key=lambda db: db.database.lower())

    return render('/admin/databases.html', databases=databases,
                  host=config.DATABASE_HOST, port=config.DATABASE_PORT)
Пример #2
0
def shutdown_session(response):
    """ remove SQLAlchemy session from thread after requests - might not even be needed for
    non-declarative SQLAlchemy usage according to the SQLAlchemy documentation.
    """
    for db in models.get_databases().itervalues():
        db.session.remove()
    return response
Пример #3
0
def shutdown_session(response):
    """ remove SQLAlchemy session from thread after requests - might not even be needed for
    non-declarative SQLAlchemy usage according to the SQLAlchemy documentation.
    """
    for db in models.get_databases().itervalues():
        db.session.remove()
    return response
Пример #4
0
def databases():
    """ Show a list of databases this web frontend is serving """
    databases = list(models.get_databases().itervalues())
    databases.sort(key=lambda db: db.database.lower())

    return render('/admin/databases.html',
                  databases=databases,
                  host=config.DATABASE_HOST,
                  port=config.DATABASE_PORT)