Django deploy problem but locally works

Hi everone, i’m facing a problem since 2 months ago and i don’t know what to do.

What happens is that i’m trying to create a django website using plotly to create some graphs. The problem is: i did it locally in my computer and worked well. When i try to deploy this website in a google cloud machine, i have some problems that i will describe bellow:

I have in my database a lot of artificial inteligence models to predict some variable. Each model has an ID to identify which model i want to predict and this id is given by url. For exemple: in this picture bellow i have id=3 so my django app will get all the models information to plot the graph and to generate the textinputs.

All text input displayed are variable and depend on which model I am using. when i run locally, it works.

but not when i go to deploy, i faced this problem bellow:

The first time that i acess the page, the django dash gives me that the plotapp was not found. After i reload my page like 5 times, the graph is shown and works.

but when i change the id to 4, for exemple, the graph that is shown is the graph with id 3, not 4.

And there are some cases that my graph doesn’t even appers:

Does anyone faced this? I don’t know what to do.

Hi @paulohiroshi
Welcome to the community. I hope there are community members that use Django-Dash that have encountered the same issues as you and can help.

I see that the last release/update was over a year ago. So I’m not sure how frequently maintained it is.

Have you considered using Dash instead of the Django-Dash library? Are you using Django-Dash for a particular reason?

Hi Adam,

I’ve searched for some tutorials and all of them redirect to Django-Dash library. I use Django-Dash to connect my dash to my website in Django but i don’t think that it can be done with Dash library, do you have an ideia?

Thanks a lot for your reply.

Using Django-Dash to connect Dash to your website in Django makes sense. One thing you could do is recreated your website with Dash pages, but that might take longer and you should probably wait for pages to be released. Hopefully in several weeks.