django-plotly-dash
django-plotly-dash copied to clipboard
Redirect from Dash app back to Django home page
I was able to redirect to a dash app from Django using the tag: ` {%load plotly_dash%}
but couldn't find a way to navigate (redirect) back to the Django home page template. any idea??
When you register you urls, you can name each route. Insert a link back to the homepage using something like {% url "home"%}
where home
should be replaced by the name of the route.
See the django documentation for more info. Google will be your friend here.
hi @GibbsConsulting , in Django HTML template I can add a href={% url "home"%} but I am not able to use it inside the plotly dash app I tried to do something like this
dbc.Button(
"Skip", id="skip-button", external_link=True, href="../../", outline=True,
),
it opens the home page but inside the dash app layout ...
Ah OK, you want to be able to say to the outer page, from the inner iframe, 'please go to X'. I suspect your alternatives are (a) dont use the iframe version of the template, which does have other implications such as the lack of encapsulation, or (b) some javascript to communicate to the outer page.
The latter would be a nice feature to have in general, as would the closely related one of allowing separate dash apps on the same page to communicate with each other.
Has anyone been able to solve this? I am unable to use the non-iframe version as i need to input some initial_arguments.