- Run
pip install django-data-browser
. - Add
"data_browser"
to installed_apps. - Add
path("admin/data-browser/", include("data_browser.urls"))
to your urls. - Run
python manage.py migrate
. - If you have queryset annotations in your admin or are interested in exposing calculated values see the
Calculated and Annotated fields
_ section.
- Clone the repository
- Install in editable install mode
pip install -e <dir>
- Run NPM for frontend files.
cd frontend
npm install
Front end files are in frontend/
. When you make changes to any files, the files should be compiled using
./build_fe.sh
Full rows are automatically sent as background tasks and available for download once completed.
In order to define a custom model class to store background reports into, you can specify it with the following configs
{
... other data browser configs...
"DATA_BROWSER_REPORT_TASK_MODEL": "data_browser.models.ReportTask",
"DATA_BROWSER_REPORT_STATE_MODEL": "data_browser.models.ReportState",
"DATA_BROWSER_RUN_BACKGROUND_REPORT_FUNC": "data_browser.tasks.run_background_report",
"DATA_BROWSER_GENERATION_TIMELINE_SECONDS": 300,
"REPORT_EXPIRY_SECONDS": 86400,
}
Once installed in LMS, You can check the admin page for Data Browser Page to view the page.