Comments (14)
Hi, here is what I got as dashboard PoC with Suit and Highcharts:
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):
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.
@SalahAdDin I wrote a blog post (my first one, always wanted to use github pages) to explain how I did this ;)
from django-suit.
My vote would be for Google Analytics integration (just like https://github.com/yawd/yawd-admin). 😃
from django-suit.
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...
from django-suit.
@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.
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.
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.
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.
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.
Looks promising. They support various plotting APIs. Thanks for sharing.
from django-suit.
@darklow Wondering if this is something that has evolved in the past 2 years or has just been forgotten.
from django-suit.
👍
from django-suit.
@pawamoy , man, will be great that you make a tutorial for use charts in django-suit.
from django-suit.
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)
- Almost a year without any new merges? HOT 3
- Chosen list in filtered manytomany field is too small to see any chosen selections
- Error 500 on demo HOT 1
- Missing arrow on select with suitv2
- Django Suit v2 Date Inline not showing calendar
- Unable to test an admin action with suit installed HOT 1
- when use npm run build,get a error
- Django Admin Hide Superuser User HOT 1
- Template Issue Filter position v2 HOT 4
- v2 suit tabs not working HOT 1
- Any V1 forks that support Django 3x? HOT 16
- RTL support
- V2 forks on bootstrap5 : need help HOT 2
- add subitems for the suit menu subitems(3 level tree)
- Row styling failing silently?
- object-tools actions not rendered
- Can't Login Into Admin Portal
- Cant see hours for last row in calendar
- Does the tab page contain data changes? HOT 1
- Django 4.2 compatibility issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-suit.