Skip to content

Application

init_app(app)

Initializes the SQL administration admin interface.

Parameters:

Name Type Description Default
app HestiaApp

The Hestia application.

required
Source code in hestia/extensions/sqladmin/application.py
31
32
33
34
35
36
37
38
39
40
41
42
def init_app(app: HestiaApp) -> None:
    """
    Initializes the SQL administration admin interface.
    :param app: The Hestia application.
    """
    engine = create_async_engine(str(settings.db_url))

    authentication_backend = _init_auth()
    admin = Admin(app=app, engine=engine, authentication_backend=authentication_backend)

    # Register views
    _register_views(admin)