I created a Vue component for a page in my Django, project. Now i'm trying to add to the component a tradingview widget, it looks like this:
<div class="col-md-6">
<div class="main-chart mb15">
  <!-- TradingView Widget BEGIN -->
  <div class="tradingview-widget-container">
    <div id="tradingview_e8053"></div>
    <script src="https://s3.tradingview.com/tv.js"></script>
    <script>
      new TradingView.widget(
        {
          "width": "100%",
          "height": 450,
          "symbol": "BINANCE:BTCUSDT",
          "interval": "D",
          "timezone": "Etc/UTC",
          "theme": "Dark",
          "style": "1",
          "locale": "en",
          "toolbar_bg": "#f1f3f6",
          "enable_publishing": false,
          "withdateranges": true,
          "hide_side_toolbar": false,
          "allow_symbol_change": true,
          "show_popup_button": true,
          "popup_width": "1000",
          "popup_height": "650",
          "container_id": "tradingview_e8053"
        }
      );
    </script>
    </div>
    <!-- TradingView Widget END -->
</div>
The problem is that if I load it inside the component
<template>
  <div id="myComponent">
    ...
  </div>
</template>
I get this error:  Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed.
Is there any way I can fix this?
 
     
     
    