Skip to content

How to add more /dashapp/ views? #80

Open
@satrio-yudhoatmojo

Description

@satrio-yudhoatmojo

Hi, your tutorial is very good! I have a question. Let's say I want to build a view for showing data and it's a different view than the dashboard (/dashapp/) - let's say it goes to /dashapp/summary. How do I do this?

Activity

capihacendado

capihacendado commented on Feb 10, 2021

@capihacendado

same doubt here

capihacendado

capihacendado commented on Feb 10, 2021

@capihacendado

Well actually I just did a work around to achieve it, and hopefully if there is a more clean way to do it, just let me know.

What I did is:

  • To create another .py file with another dashboard
  • In your init must import this .py and and use the function just like the example shows you

`

    from .plotydash.dashboard import init_dashboard
    from .plotydash.dashboard2 import init_dashboard as in_2
    app = init_dashboard(app)
    app = in_2(app)

`

  • Also to need to create a link in the jinja2 that point the desired url

if you don't want to create new .py you can create and import another function inside the dashboard.py that create another dashboard.

Hope it helps and if there is a better solution please let it know

hansendm

hansendm commented on Jul 19, 2021

@hansendm

Do you have to use the jinja2 ? I've never messed with them before. Could you build a cascade of jinja2's, one underneath another? Say for instance you have a bunch of incubators and you want to show the current temperature and humidity but once you click on one of these you would open up your dashboard for that incubator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @satrio-yudhoatmojo@hansendm@capihacendado

        Issue actions

          How to add more /dashapp/ views? · Issue #80 · toddbirchard/plotlydash-flask-tutorial