dash-tradingview icon indicating copy to clipboard operation
dash-tradingview copied to clipboard

Trying to make it work with django-plotly-dash

Open notgonnamakeit opened this issue 2 years ago • 0 comments

I've run into an issue where I use dash-tradingview with django-plotly-dash:

https://github.com/GibbsConsulting/django-plotly-dash/issues/477#issue-1964356841

The requested JS file isn't available on unpkg.com, and I found references to that in the dash-tradingview's init.py file:

_js_dist.extend(
    [
        {
            'relative_package_path': 'dash_tvlwc.min.js',
    'external_url': 'https://unpkg.com/{0}@{2}/{1}/{1}.min.js'.format(
                package_name, __name__, __version__),
            'namespace': package_name
        },
        {
            'relative_package_path': 'dash_tvlwc.min.js.map',
    'external_url': 'https://unpkg.com/{0}@{2}/{1}/{1}.min.js.map'.format(
                package_name, __name__, __version__),
            'namespace': package_name,
            'dynamic': True
        }
    ]
)

When I run the app outside the django-plotly-dash wrapper, it does seem to serve the JS file locally instead of getting it from unpkg.com where it's not available.

Any ideas on how to fix that?

notgonnamakeit avatar Oct 27 '23 09:10 notgonnamakeit