I have a dash app running in flask and in order to update the dash dashboard I'll need to redirect to URL/dash instead of URL/dashapp/ on refresh page.
Is that possible using a callback?
Related
I am building a multipage web app using GAS.
The actual URLs for the pages of my app are generated by my GAS and passed via the data variable to my html template.
A scriptlet is inserting the URL into the html template:
<a href="<?= data.urlVUS ?>" >User</a>
The problem is: The first time I click on the link the page is loaded. The second or third time I click the link I see just a blank browser page.
There is no error in my GAS log or in the browser that indicates what is wrong.
My GAS is using
return myPage.evaluate().setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
I am not sure if it is contributing to the problem, but I am embedding the web app via an iframe within a Wordpress page.
Am looking for an example where people have tried embedding Dash app to an existing HTML/CS without letting the Dash app running. Ideally, the dash app should be triggered from within the HTML page. Something better than https://dash.plotly.com/integrating-dash which seems to expect the dash app to run in the background and connect the dash app URL.
Thank you Emher, we managed to get the dash app embedded into a pre-made HTML page by parsing iframe (src = ) :
we had a flask that runs the companies wireframe written in CSS & HTML.
used 'server' parameter to piggyback on flask
added one iframe (src = Dash app) to the HTML layout for each data science dash app we have.
Will check out 'webdash' as well for creating lightweight POC
I am developing an application using React/Redux. The application reads from a Json file and saves changes back to the json file.
Its a two page application but I am not using any router. All the editing and saving part is done on the second page, where I am hiding the home page.
My problem is that whenever I am saving something it goes back to the home page, which I know is the default behavior as the source is getting updated. So it is re-rendered. I am using different action for the second page rendering.
But what I am looking for is a simple solution for it to stay on the second page where I can show a success message that the data was saved.
"Where you are hiding the home page" - this suggests you are looking for clientside routing, for which react router would be the normal option: https://github.com/ReactTraining/react-router. You can also look into doing it purely with hooks: https://blog.logrocket.com/how-react-hooks-can-replace-react-router/
I have question about redirecting with HTTP_AUTHOZIATION header.
I have two apps:
Frontend Angular app
Ruby on Rails app
Is it possible to create a link in Angular app that redirects to Ruby on Rails html page with HTTP_AUTHORIZATION header and then read that HTTP_AUTHORIZATION header in rails?
You cannot create a direct link with authorization headers.
When you use $window.location.href the browser is making the HTTP request and not your JavaScript code.
You could use cookie via JavaScript and put your auth token there. this cookies will automatically be sent from the browser. However, you will want to review the security implications of using a cookie vs. a header.
I am using an intent:// link to redirect users to an app, and hoping to use the S.browser_fallback_url field to redirect the users to the PlayStore if they do not have the app downloaded by setting the fallback url to be a market:// link with params added in.
Is the S.browser_fallback_url only capable of handling web links? as in, it wont work with market links?