Skip to content

iblai/ibl-django-data-browser-app

 
 

Repository files navigation

IBL Django Data Browser App

Installation

  1. Run pip install django-data-browser.
  2. Add "data_browser" to installed_apps.
  3. Add path("admin/data-browser/", include("data_browser.urls")) to your urls.
  4. Run python manage.py migrate.
  5. If you have queryset annotations in your admin or are interested in exposing calculated values see the Calculated and Annotated fields_ section.

Development

  1. Clone the repository
  2. Install in editable install mode pip install -e <dir>
  3. Run NPM for frontend files.
cd frontend 
npm install

Customizing the UI

Front end files are in frontend/. When you make changes to any files, the files should be compiled using

./build_fe.sh

Background Tasks

Full rows are automatically sent as background tasks and available for download once completed.

Additional configs

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,
        
}

Installing in LMS/ Other Django Projects

Once installed in LMS, You can check the admin page for Data Browser Page to view the page.

About

Django app for user friendly querying of Django models

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 88.9%
  • JavaScript 9.0%
  • SCSS 1.5%
  • Other 0.6%