Comments (5)
Hi Mike,
Thanks for getting in touch. Basically all you need to do to register your dashboard is add
registry.register(DashboardClassName)
to to bottom of your dashboards.py file. Where DashboardClassName
is the Dashboard you have created.
You need to do this for every dashboard you create. So if you had 2 dashboards, DashboardOne
and DashboardTwo
, set up you would add:
registry.register(DashboardOne)
registry.register(DashboardTwo)
Your final dashboards.py file should then look something like:
from dashboards.dashboard import Dashboard
from dashboards.component import Text, Chart
from dashboards.registry import registry
from demo.mydashboard.data import DashboardData
class FirstDashboard(Dashboard):
welcome = Text(value="Welcome to Django Dashboards!")
animals = Chart(defer=DashboardData.fetch_animals)
class Meta:
name = "First Dashboard"
registry.register(FirstDashboard)
I hope this helps but if not, or you have any further questions please get back in touch.
from django-dashboards.
from django-dashboards.
from django-dashboards.
Hi Mike,
It's hard to tell but looks like maybe your virtual env isn't active or using a different one when running the code.
If you run pip freeze
do you see django-dashboards listed?
How are you running the code? Is it command line or via a code editor like VS Code?
You also sent your folder structure but the formatting seems to have messed up. Could you send it again and also show where the manage.py, settings.py and urls.py files live.
from django-dashboards.
from django-dashboards.
Related Issues (8)
- I am working on a Awesome-Python-HTMX, seeking your feedback HOT 2
- Plotly is not loaded with version 0.1.5... HOT 3
- How can I override the default css file? HOT 7
- Add HTML in Card() heading? HOT 4
- Can I add an image with a link in a Card? HOT 1
- Form template is missing {{form.media}} HOT 1
- Strange issue on Tables: they appear empty on first load... HOT 7
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-dashboards.