Skip to main content

Create a dashboard within Django admin interface

Project description

Django Suit Dashboard

Create a dashboard within Django admin interface.

This application was originally designed to work within Django Suit (hence the name), but it is now decoupled from it, you can use it without Suit.

Here is a quick explanation of how it works:

  • you write a base template to add CSS/JavaScript libraries (optional)

  • you write a custom AdminSite to override default URLs and/or add others

  • you write the corresponding views, inheriting from DashboardView

  • each view render the base template (or an extended one) with a grid in the context (layout of rows and columns)

  • columns can contain boxes of content (visual separation on the page)

  • boxes can contain widgets, for which you write the HTML/CSS/JS

So basically django-suit-dashboard does not do much, it just provides a way to create a dashboard in admin interface without touching too much to HTML (which not everyone will approve).

Screenshot

Screenshot

License

Software licensed under ISC license.

Installation

pip install django-suit-dashboard

Documentation

On ReadTheDocs

Demo project

Follow these instructions to run the demo locally:

git clone https://github.com/Pawamoy/suit-dashboard-demo
cd suit-dashboard-demo
./install.sh
^C (Ctrl-c)
./run.sh [with-suit]  # any non-empty arg will do

Connect to the admin interface with your system username and password admin_password.

Don’t hesitate to send me Pull Requests to share your boxes and widgets, I will add them into the demo pages!

Applications using Suit-Dashboard

Here is a list of Django Apps using Suit-Dashboard. You might find some interesting ways of using it.

Development

To run all the tests: tox

Changelog

2.0.4 (2017-05-29)

  • Fix dashboard_js block not being added while rendering when not using Django Suit.

  • Add demo project.

  • Add diagram in documentation.

  • Remove display templates (if you were using them, please copy them back from the docs into your project).

2.0.3 (2017-04-10)

  • Use instance’s crumbs.

  • As for boxes, accept keyword arguments to set in widgets.

  • Fix real-time setting default url_name.

  • Remove PartialResponse from __init__.__all__.

  • Update breadcrumbs to strictly match classic and Suit’s styles.

2.0.2 (2017-04-03)

  • Add title option to views.

  • Don’t display crumbs if none.

  • Move PartialResponse into real-time function to avoid AppsNotReady (fix #30).

2.0.1 (2017-03-29)

  • All objects are now importable directly from suit_dashboard.

  • Moved application settings into an apps module.

2.0.0 (2017-03-20)

The version 2.0.0 adds more flexibility and simplicity of usage to the application. It doesn’t try to be smart anymore, nor force usage of particular CSS/JS libraries.

  • Add app settings (currently just SUIT_DASH_DEFAULT_TIME_INTERVAL).

  • Uncouple from Django Suit. The name will remain django-suit-dashboard because it was originally designed to work within Django Suit. The application sees if Suit is in use and set the breadcrumbs accordingly (it supports both classic and Suit style).

  • A suit variable is injected into template’s context so you can update behavior according to it. Use it like {% if suit %}...{% endif %}.

  • Various API changes, check the documentation to see them.

1.0.3 (2016-12-31)

  • Updates from upstream cookiecutter-pydjama.

1.0.2 (2016-10-19)

  • Fix Python 3 compatibility.

1.0.1 (2016-09-30)

  • Fix type check of column elements.

  • Fix missing dependency django-braces.

1.0.0 (2016-09-01)

Various fixes and behavior changes.

  • Fix bumpversion configuration.

  • Add possibility to give grid as argument to super get.

  • Change persistent to false (unpredictable behavior with cache?).

  • Fix changing URL for refreshable items.

  • Update docs, decorator now supports args or not, fix case when multiple series in template.

  • Allow lazy initialization for boxes (or not).

  • Change Box behavior, improve refreshable decorator, implement JSON refresh in box template.

  • Fix URLs in README.

  • Configure isort to understand django apps, fix imports order.

  • Add refreshable data view and decorator and display.

  • Fix inconsistent title error.

  • Remove BSD2 link from README.

  • Display item names only if they exist.

  • Change context to kwargs, add context as argument.

  • Fix issue #4.

  • Fix overwriting default value if variable’s parent was defined. Also log exceptions in console.

  • Add id for each item in table.

  • Move element title inside ‘group’ condition.

  • Fix issue #1.

0.1.0 (2016-04-19)

  • Alpha release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-suit-dashboard-2.0.4.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

django_suit_dashboard-2.0.4-py2.py3-none-any.whl (15.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-suit-dashboard-2.0.4.tar.gz.

File metadata

File hashes

Hashes for django-suit-dashboard-2.0.4.tar.gz
Algorithm Hash digest
SHA256 6482a3d8078849c34ce95d414bfd46ed2604d589ef0b6d62642d2013ed344c5c
MD5 4ee24890e2440219dcdc43634c683f86
BLAKE2b-256 90f2df3fc47d0df3cb1964cd56fb05211569a450948ecf3078de7b2f6bf9f48e

See more details on using hashes here.

File details

Details for the file django_suit_dashboard-2.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_suit_dashboard-2.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 992cdfa26828a89d6803b16f1c40afb8b4463b5b2fb427cfd6bf072fdc057676
MD5 53740edb2869f0786c6a482f83b50843
BLAKE2b-256 ec5fd986986c7803e7dbded3ca7c5e2e7f6b12c478b954c16b5a3666aa64c169

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page