Collection selection

This is the official documentation of the forestadmin-agent-django and forestadmin-agent-flask Python agents.

You may not want to import all collections from a data source.

This can be achieved by providing a whitelist or a blacklist in the options of the agent.add_datasource method.

from flask_sqlalchemy import SQLAlchemy
from forestadmin.datasource_sqlalchemy.datasource import SqlAlchemyDatasource

db = SQLAlchemy()
with app.app_context():
    agent.add_datasource(SqlAlchemyDatasource(db), {
        "include": ["Book", "Review"],
        # You can also exclude
        "exclude": ["Author", ...]

Last updated