Coder Social home page Coder Social logo

Comments (14)

pawamoy avatar pawamoy commented on July 25, 2024 2

Hi, here is what I got as dashboard PoC with Suit and Highcharts:

capture du 2016-04-05 13-08-34

I followed instructions found in #409.
However it seems I can't use columns as in Bootstrap, with col-md and stuff. So I used the class suit-column, and I noticed that each new div with this class is stacked next to the previous one. It is already great but not precise enough 🐤 As you can see on the above screenshot, the first row with two columns is not expanding to the maximum width. And if I add a third column, the three are not thin enough to fit in the maximum width and the last one appears on a second row. Besides some weird resizing happens when resizing the window (but it might just be Highcharts):

capture du 2016-04-05 13-08-16

Question: what would be the best way to work with columns with what Suit is already providing?
Conclusion: a dashboard should be customizable with columns 🐹

from django-suit.

pawamoy avatar pawamoy commented on July 25, 2024 2

@SalahAdDin I wrote a blog post (my first one, always wanted to use github pages) to explain how I did this ;)

from django-suit.

maartendraijer avatar maartendraijer commented on July 25, 2024

My vote would be for Google Analytics integration (just like https://github.com/yawd/yawd-admin). 😃

from django-suit.

skndn60 avatar skndn60 commented on July 25, 2024

I have made a custom dashboard by overriding index.html and implementing a couple of custom tags. This works pretty well and effectively gets rid of the default (and now useless due to the great menu of DS) version of index.html.

It all depends what you intend to do with your admin. For me the admin is a tool for the end user and I have fairly far reaching customisations in my admin templates.

I have attached a screen shot of my dashboard so far. I have played around with Google Charts (https://google-developers.appspot.com/chart/interactive/docs/gallery) which looks really neat. Widgets that encapsulate the various charting options would be awesome; I think there's already a Pyhton wrapper for them but I haven't tried that out yet...

Screen Shot 2013-03-22 at 11 09 36

from django-suit.

darklow avatar darklow commented on July 25, 2024

@skndn60 got a valid point and proves that django templating is most powerful tool already, you can put in your templates anything you want - wether it is charting, stats or simple list. Use templatetags and you got your reusable widget system already.

I think what Django Suit needs is to provide alternative Home url, where you can put your own dashboard, which will affect login redirect, home link in location bar and so on. Also related to #43

from django-suit.

jonashaag avatar jonashaag commented on July 25, 2024

How about designing this around some sort of plugin architecture.

class MyDashboard(Dashboard):
    columns = [
        # col 1
        [
            ("Server stats", ['suit_stats.requests_per_seconds', 'suit_stats.cpu_usage']),
            ("Frequently used", ['auth.users', 'polls']),
        ],
        # col 2
        [
            ("Registrations", ['total_users', 'recently_registered_users']),
            ...
        ],
        ...
    ]

    def total_users(self):
        return User.objects.count()
    total_users.short_description = "Total user count"

    def recently_registered_users(self):
        users = User.objects.all()[:10]
        return render_to_response('mydashboard/recent_registrations.html', {'users': users})

Items can be names of either

  • methods of the Dashboard subclass
  • apps
  • models
  • methods somewhere else ("plugins")

Just an idea.

from django-suit.

grillermo avatar grillermo commented on July 25, 2024

I would love a way to add buttons to the change view of my models.
From the admin.py of the app like the admin actions, that would be super useful.

If you want to integrate analytics or stats, i wouldnt go with python generated one, i've tried them all, in my experience is way better to generate graphs on frontend space, htm, css, javascript, those tools are closer to the problem, my recommendation, jqplot. But a python api for their javascript api seems a bad idea.

from django-suit.

skndn60 avatar skndn60 commented on July 25, 2024

Hmm... you need something to aggregate/slice/dice your server side data and then display them with a graphing library frontend. I prefer Python for that anytime. Obviously the actual plotting is frontend. Google Chart and the Python API aim to do just that... You just push your chart data to Google and they return a high quality chart which you insert into your template (either a url or an image). I had a quick look at it and added a Geo chart (like the one you see in Google Analytics) with one trivial custom template tag. Added bonus: no libraries and version to juggle, no hosting. I like it.

from django-suit.

gamesbook avatar gamesbook commented on July 25, 2024

A new app, Graphos (https://github.com/agiliq/django-graphos) might be a simple and quick way to add charts & plots to the dashboard (not that there is anything wrong with Google! but if your system is hosted inside a company, with no external calls allowed, then this type of approach might be better).

from django-suit.

skndn60 avatar skndn60 commented on July 25, 2024

Looks promising. They support various plotting APIs. Thanks for sharing.

from django-suit.

Zowie avatar Zowie commented on July 25, 2024

@darklow Wondering if this is something that has evolved in the past 2 years or has just been forgotten.

from django-suit.

SalahAdDin avatar SalahAdDin commented on July 25, 2024

👍

from django-suit.

SalahAdDin avatar SalahAdDin commented on July 25, 2024

@pawamoy , man, will be great that you make a tutorial for use charts in django-suit.

from django-suit.

pawamoy avatar pawamoy commented on July 25, 2024

Actually I created a django-app: django-suit-dashboard, go take a look if you are interested.

It lets you arrange widgets with rows and columns in your admin pages. The templates can already render highcharts' charts but you will have to write them at hand (in python), dump them in json and pass them as context (in widgets). I will write a small example in the docs when I have the time.

The app is only a few days old, so be indulgent!!

from django-suit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.