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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

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