У меня есть следующий код, который работает нормально:
Код: Выделить всё
@ms_app.app.callback(Output("page-content", "children"), Input("url", "pathname"))
def render_page_content(pathname):
authorized = True #TODO: Change this when better integration with DNN
if ((pathname == "/") or (pathname == "/login/callback")):
return heatmaps_page.page_content
elif pathname == "/page-gestion":
return gestion_page.page_content
Код: Выделить всё
elif pathname == "/embedded-ms":
return redirect("https://www.somewebsite.com/mob/bi-ms?iframe=true" )
Подробнее здесь: https://stackoverflow.com/questions/786 ... e-dash-app