@delsim Thank you so much for your solution now it works fine but now I have another question.
Well first this is what I added to the settings.py
:
. . .
#Add PLOTLY_COMPONENTS
PLOTLY_COMPONENTS = [
'dash_core_components',
'dash_html_components',
'dash_renderer',
'dpd_components',
'gif_player']
. . .
Second, notice that I added gif_player instead of dash_gif_component that’s because dash_gif_component doesn’t have the option to add an id to the component which is bad fo me because I need to call the component in a callback.
So, at first I tried modifying the github repo but npm kept giving me some module errors, so I built the same component with the same code but this time adding the id to the component and it looks like this: (All of this was done following: cookiecutter dash-component-boilerplate)
gif.GifPlayer(
id='first_gif',
gif='https://urltogif/gif.gif',
still='ds'
)
Finally, it worked fine and for testing it in my django_plotly_dash app I deployed the python package to test.pypi, the thing is I’m new to developing this kind of things so because packages in test.pypi only last for certain amount of time my questions would be:
-
Should I deploy the package to the real index of PyPi? (I don’t know about this one because I literally added like 10 lines of code.)
-
Should I try to talk with the original author to try to update the package?
-
Or there is another better way?
[EXTRA]
The gif that I’m trying to show is generated via a python script that I made using web scraping this is the script: Python Script, my question is if it’s possible to make this script live inside the django_plotly_dash app and use live update callback to refresh the gif every 20 minutes or so.
The problem is that the script takes like 1 minute to run because it downloads approx. 16 png files that are 5424x5424.