Skip to content

interlegis/django-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-dashboard

A django app for creating dashboards

Django-dashboard is a Django app for creating dashboards using the Chart.js javascript library.

Requirements:

  • Python > 3.10
  • Django > 5.0
  • Pandas > 2.2

Javascript libraries:

Getting it

You can get django-dashboard using pip:

$ pip install django-dashboard

Installing it

To enable django-dashboard in your project you need to add dashboard to INSTALLED_APPS in your project's settings.py file:

    INSTALLED_APPS = (
        ...
        'dashboard',
        ...
    )

Optionally you can add dashboard.context_processors.dashboard to the context_processors list inside OPTIONS to get a dashboard context variable in all templates:

    TEMPLATES = [
        {
            "BACKEND": "django.template.backends.django.DjangoTemplates",
            "DIRS": [BASE_DIR / "templates"],
            "APP_DIRS": True,
            "OPTIONS": {
                "context_processors": [
                    "django.template.context_processors.debug",
                    "django.template.context_processors.request",
                    "django.contrib.auth.context_processors.auth",
                    "django.contrib.messages.context_processors.messages",
                    "dashboard.context_processors.dashboard",
                ],
            },
        },
    ]

Add the following to your root urls.py file:

    from dashboard.registry import dashboard
    ...
    urlpatterns = [
        ...
        path("dash/", dashboard.urls),
        ...
    ]

Note that the URL path can be whatever you want.

About

A django app for creating dashboards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published