django-dashing is a customisable, modular dashboard application framework for Django to visualize interesting data about your project. Inspired in the dashboard framework Dashing

Overview

django-dashing

https://travis-ci.org/talpor/django-dashing.svg?branch=master

django-dashing is a customisable, modular dashboard application framework for Django to visualize interesting data about your project. Inspired in the exceptionally handsome dashboard framework Dashing

Check out a demo over here.

dashboard screenshot

Prerequisites

  • Django 1.5.+
  • Django Compressor (optional)

Key concepts

  • Use premade widgets, or fully create your own with css, html, and javascript.
  • Use the API to push data to your dashboards.
  • Drag & Drop interface for re-arranging your widgets.

Installation

  1. Install latest stable version from PyPi:
$ pip install django-dashing
  1. Add dashing to INSTALLED_APPS of the your projects.
INSTALLED_APPS = (
    ...
    'dashing',
)
  1. Include the dashboard URLconf in your project urls.py like this:
from dashing.utils import router
...
url(r'^dashboard/', include(router.urls)),
  1. Start the development server and visit http://127.0.0.1:8000/dashboard/ to view the dummy dashboard.

Quick Start

To make your own dashboard and retrieves the data from django you should:

  1. Create a django dashboard application with a widgets.py file
  2. Create your widget extended from NumberWidget, ListWidget, GraphWidget or simply Widget (from dashing.widgets), for example see.
  3. Register your widget in urls.py like:
from django.conf.urls import url, include
from dashing.utils import router

from project.dashboard.widgets import CustomWidget

router.register(CustomWidget, 'custom_widget')

urlpatterns = [
    url(r'^dashboard/', include(router.urls)),
]

Create a dashing-config.js file with a widget that retrive the data in your static directory like:

var myDashboard = new Dashboard();
myDashboard.addWidget('customWidget', 'Number', {
    getData: function () {
        var self = this;
        Dashing.utils.get('custom_widget', function(data) {
            $.extend(self.scope, data);
        });
    },
    interval: 3000
});

Also if you want to locate the config file in a different directory you can create a dashing/dashboard.html file in your TEMPLATE_DIRS and replace the config_file block to the route of your javascript config file, see the docs.

Testing

Install dependencies.

$ npm install
$ pip install -r requirements.txt

Run tests.

$ npm test

Links

Comments
  • Widget Template Registry

    Widget Template Registry

    It's not easy to use third-party or proprietary widgets from multiple sources right now. I suggest using a registry using settings.py as this feels like configuration.

    dashboard.html can then consult this registry and use that for the list of html templates to include, perhaps in the form of a templatetag or something.

    opened by mverteuil 8
  • Conditional background color

    Conditional background color

    I'm stuck on something which is maybe trivial... have checked the documentation, source code, and the various examples but no luck.

    How can I show a different background color with the Number widget?

    Would like to show Green if a number = zero, and Red if number > 0.

    Thanks for the cool dashboard by the way :-)

    opened by wimkerkhoff 7
  • Embedding links into Dashboard?

    Embedding links into Dashboard?

    This isn't really an issue, but rather a question. I would like to add links inside a widget, but seems I can't do that. I'm guessing the Widgets are readonly...

    I see I can add links on the html page for the dashboard, but is there a way I can do this with a widget?

    Like the list widget, put in a clickable link?

    (I tried adding href to a key,value in data, but no joy.

    opened by lmaloney 6
  • Install & Usage

    Install & Usage

    Thanks for making this awesome project, but I'm having an issue installing and usage....

    I've followed the documentation, and I can pull up the built in "demo" dashboard in my project, however the docs don't really explain how to setup an HTML file/view for my own custom dashboard.

    I could modify the default dashboard, but that's not what should be done.

    I went ahead and created an HTML file, and served it through a view like this:

    from django.http import HttpResponse, StreamingHttpResponse from django.shortcuts import render, render_to_response, redirect, RequestContext

    view.py: def test_dashboard(request):

    context={ }
    return render(request,'dashing/dashing.html',context)      
    

    html file: {% extends 'dashing/base.html' %} {% load staticfiles %}

    {% block 'stylesheets' %}

    {% endblock %}

    When I render this, I still get the default dashboard data, even if my dashing-config.js file is empty.

    So, my questions are two fold:

    1.) How do I setup my own dashboard (not use the built in dashboard) (I've read the example trelio card app, and still can't figure it out)

    2.) Once I am rendering my HTML document, how to I point the JS/HTML to retreive data from the widget classes setup?

    opened by lmaloney 5
  • rolling dashboards by URL parameter

    rolling dashboards by URL parameter

    this should fix #12 and #11 as described in the issues and should fix the issues from the last pull request. I added additions to the documention as well.

    opened by torstenfeld 5
  • Map URL arguments to parameters in widgets

    Map URL arguments to parameters in widgets

    It would be nice if I could write a general widget, for example a github repository commit list (I have written this in my fork but it's pretty messy), to use URL parameters to pass configuration options like the repo to watch and the most recent commits.

    I can see a case to be made for REST style URLs here (i.e. /widgets/githubcommits/talpor/django-dashing/) or parameterized requests (i.e. /widgets/githubcommits/?user=talpor&repo=django-dashing)

    This project is fantastic and has good velocity and I'd be happy to discuss design and implementation of this feature if you like. Have you considered this yourself?

    opened by mverteuil 5
  • where do you suggest to place dashing-config.js or dashboard.html ?

    where do you suggest to place dashing-config.js or dashboard.html ?

    just curious..

    I could place code under my project's app/dashing/static/dashing/dashing-config.js

    but from dashing import <something> would cause problems when I start to add python codes under app/dashing/

    So where do you suggest to place those files?

    opened by pcompassion 4
  • Knob not updated on new data

    Knob not updated on new data

    Graph and List both update on $.extend( this.scope, scope ), however Knob (specifically, scope.value and scope.data.fgColor) does not. (I want a knob that changes its foreground colour based on the value, in the standard "green/yellow/red" scheme.)

    For example, the following will update the numerical value displayed (i.e. the one hidden by scope.data.displayInput), but not the arc itself:

    dashboard.addWidget( "MyWidget", "Knob", {
        getData: function() {
            var scope = GetWidgetScope();
            $.extend( this.scope, scope );
        }
    });
    

    I've been able to work around this by adding these trigger calls to the end of getData, but I'd rather this was handled by the library itself:

    $( ".dashing-knob" ).trigger( "change" );           // updates the value
    $( ".dashing-knob" ).trigger( "configure", data );  // updates the colour/etc
    
    opened by Syeberman 4
  • Own modules

    Own modules

    Hey,

    I'm trying to setup this really cool tool. Unfortunatelly I am not able to create my own widgets. I was trying it with the documentation (created own PyPI package with my custom widgets with no success). Is there somebody who has some experience with creating own widgets? Can you share all steps needed?

    Also there is a question when I have own widget with python class, how can I pass parameters from js to the python? I want to have one widget to be used with different data passed to python. Is it possible? I didn't find any reasonable example.

    Thanks a lot! :-)

    opened by mliner 3
  • map: add support for specifying a Google Maps API key

    map: add support for specifying a Google Maps API key

    I did not get the map widget to work without adding a Google Maps API key to the JS script loading function, hence this PR.

    It's implemented using an additional settings key, WIDGET_CONFIGS, to hold the API key, because as I understand it it's not possible to have it in dashing-config.js since the Google Maps javascript has already been loaded earlier in dashing.js. I added a new template tag, widget_configs, similar to the existing styles and scripts tags, since once again I saw no over simpler way to do it.

    If you agree with the way this is implemented I'll go about updating the docs as well to explain how the new settings key must be used (it's basically a widget name -> {key, value} dict that ends pushed down as <script> snippets in base.html).

    opened by noirbee 3
  • Question Developing New Widget Locally

    Question Developing New Widget Locally

    I am a little confused on how to set up my directory when I am trying to develop and test a widget locally. Based on the documentation I have my directory like this in my project:

    project/ -----static/ ----------dashing-config.js ----------widgets/ ---------------custom_widget.js ---------------custom_widget.css ---------------custom_widget/ -------------------- custom_widget.html

    When I do this and add my custom widget to my INSTALLED_WIDGETS option in my settings.py, I receive a "custom_widget does not exist" error in my web console.

    opened by ryantenorio 3
  • docs: Fix a few typos

    docs: Fix a few typos

    There are small typos in:

    • README.rst
    • docs/getting-started.rst

    Fixes:

    • Should read retrieve rather than retrive.
    • Should read necessary rather than neccesary.

    Semi-automated pull request generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

    opened by timgates42 0
  • Fixed widgets

    Fixed widgets

    Good morning,

    I am quite new working in this area, and I am in a project in which I have inherited a code that works with djago-dashing.

    We have a panel with four widgets (2 Number type and 2 List type). My question arises because when I click on a widget and drag the widget it changes position with the rest.

    Is there any way to fix these widgets and it is not possible to move them with the mouse.

    Thank you very much

    opened by angelmc 0
  • Bump django from 1.10 to 2.2.24

    Bump django from 1.10 to 2.2.24

    Bumps django from 1.10 to 2.2.24.

    Commits
    • 2da029d [2.2.x] Bumped version for 2.2.24 release.
    • f27c38a [2.2.x] Fixed CVE-2021-33571 -- Prevented leading zeros in IPv4 addresses.
    • 053cc95 [2.2.x] Fixed CVE-2021-33203 -- Fixed potential path-traversal via admindocs'...
    • 6229d87 [2.2.x] Confirmed release date for Django 2.2.24.
    • f163ad5 [2.2.x] Added stub release notes and date for Django 2.2.24.
    • bed1755 [2.2.x] Changed IRC references to Libera.Chat.
    • 63f0d7a [2.2.x] Refs #32718 -- Fixed file_storage.test_generate_filename and model_fi...
    • 5fe4970 [2.2.x] Post-release version bump.
    • 61f814f [2.2.x] Bumped version for 2.2.23 release.
    • b8ecb06 [2.2.x] Fixed #32718 -- Relaxed file name validation in FileField.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • interval not works

    interval not works

    Hi,

    I am setting interval: 20000, but it's not works. and seems it's still random fresh data.

    var myDashboard = new Dashboard();
    myDashboard.addWidget('customWidget', 'Number', {
        getData: function () {
            var self = this;
            Dashing.utils.get('custom_widget', function(data) {
                $.extend(self.scope, data);
            });
        },
        interval: 20000
    });
    
    opened by sunjiali 0
  • Compatibility with Django 3

    Compatibility with Django 3

    I tried to use django-dashing but realized it's not updated to work with Django 3. I did try to update django-dashing to Django 3, but noted there are more than a handful of modifications to be had:

    It appears Django 3 introduces some breaking changes to django-dashing, such as removal of django.utils.six (used in dashing/settings.py), rename of settings.MIDDLEWARE_CLASSES to settings.MIDDLEWARE (used in test/test_app/test_app/settings.py). It appears some of the middlewares used in the test app do not appear to exist with the same name anymore.

    Additionally it appears Python 2.7 support was dropped from Django from ~1.1~ 1.11 onwards.

    Is there interest in supporting Django 3? Is django-dashing still supporting Python 2? Thanks in advance.

    opened by winny- 1
Owner
talPor Solutions
talPor Solutions
Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project

Django URL Shortener Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project Install this package to your Dja

Rishav Sinha 4 Nov 18, 2021
Rosetta is a Django application that eases the translation process of your Django projects

Rosetta Rosetta is a Django application that facilitates the translation process of your Django projects. Because it doesn't export any models, Rosett

Marco Bonetti 909 Dec 26, 2022
Django-Audiofield is a simple app that allows Audio files upload, management and conversion to different audio format (mp3, wav & ogg), which also makes it easy to play audio files into your Django application.

Django-Audiofield Description: Django Audio Management Tools Maintainer: Areski Contributors: list of contributors Django-Audiofield is a simple app t

Areski Belaid 167 Nov 10, 2022
Modular search for Django

Haystack Author: Daniel Lindsley Date: 2013/07/28 Haystack provides modular search for Django. It features a unified, familiar API that allows you to

Haystack Search 3.4k Jan 8, 2023
A beginner django project and also my first Django project which involves shortening of a longer URL into a short one using a unique id.

Django-URL-Shortener A beginner django project and also my first Django project which involves shortening of a longer URL into a short one using a uni

Rohini Rao 3 Aug 8, 2021
Django React - Purity Dashboard (Open-Source) | AppSeed

Django React Purity Dashboard Start your Development with an Innovative Admin Template for Chakra UI and React. Purity UI Dashboard is built with over

App Generator 19 Sep 19, 2022
An app that allows you to add recipes from the dashboard made using DJango, JQuery, JScript and HTMl.

An app that allows you to add recipes from the dashboard. Then visitors filter based on different categories also each ingredient has a unique page with their related recipes.

Pablo Sagredo 1 Jan 31, 2022
pytest-django allows you to test your Django project/applications with the pytest testing tool.

pytest-django allows you to test your Django project/applications with the pytest testing tool.

pytest-dev 1.1k Dec 14, 2022
Django project starter on steroids: quickly create a Django app AND generate source code for data models + REST/GraphQL APIs (the generated code is auto-linted and has 100% test coverage).

Create Django App ?? We're a Django project starter on steroids! One-line command to create a Django app with all the dependencies auto-installed AND

imagine.ai 68 Oct 19, 2022
A Django web application that shortens long URLs. This is a demo project to show off my tech abilities.

Django URL Shortener This project is just a complete and production-ready URL shortener web application to show off my tech and coding abilities. Impo

Seyyed Ali Ayati 5 Jan 26, 2022
DCM is a set of tools that helps you to keep your data in your Django Models consistent.

Django Consistency Model DCM is a set of tools that helps you to keep your data in your Django Models consistent. Motivation You have a lot of legacy

Occipital 59 Dec 21, 2022
Simple yet powerful and really extendable application for managing a blog within your Django Web site.

Django Blog Zinnia Simple yet powerful and really extendable application for managing a blog within your Django Web site. Zinnia has been made for pub

Julien Fache 2.1k Dec 24, 2022
Use Database URLs in your Django Application.

DJ-Database-URL This simple Django utility allows you to utilize the 12factor inspired DATABASE_URL environment variable to configure your Django appl

Jacob Kaplan-Moss 1.3k Dec 30, 2022
A Django web application that allows you to be in the loop about everything happening in your neighborhood.

A Django web application that allows you to be in the loop about everything happening in your neighborhood. From contact information of different handyman to meeting announcements or even alerts.

Kennedy Ngugi Mwaura 3 Dec 11, 2022
django Filer is a file management application for django that makes handling of files and images a breeze.

django Filer is a file management application for django that makes handling of files and images a breeze.

django CMS Association 1.6k Jan 6, 2023
Django application and library for importing and exporting data with admin integration.

django-import-export django-import-export is a Django application and library for importing and exporting data with included admin integration. Featur

null 2.6k Dec 26, 2022
Django Rest Framework + React application.

Django Rest Framework + React application.

null 2 Dec 19, 2022
This is a basic Todo Application API using Django Rest Framework

Todo Application This is a basic Todo Application API using Django Rest Framework. Todo Section - User can View his previously added todo items, creat

Atharva Parkhe 1 Aug 9, 2022
This a Django TODO app project and practiced how to deploy and publish the project to Heroku

ToDo App Demo | Project Table of Contents Overview Built With Features How to use Acknowledgements Contact Overview Built With HTML CSS JS Django How

Cetin OGUT 1 Nov 19, 2021