0
votes

Hello I have existing web app written in django and I want to add some vue js feautures. I don't want to have all the pain with webpack, so I can stick to including vue.js as an external script like this:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>

as sugested here: https://vuejs.org/v2/guide/installation.html#ad

Also I have on my page this html:

<div id="app">
    just an app
  {{ message }}
</div>

And the following inline script:

<script type="text/javascript" >
    var app = new Vue({
      el: '#app',
      data: {
        message: 'Hello Vue!'
      }
    })
</script>

But there is no message "Hello vue" on my page. As you can see on the printscreen So what do I do? enter image description here

1
Why are you downvoting it? I am doing as described in official tutorial, I have given a link. What's wrong with my desire not using webpack and just to add some vue.js fancy functionality?user2950593

1 Answers

1
votes

I got the solution it didn't work, cause django used the same braskets as vue.js something like this {{variable}}

So I turned off django braskets: like this:

{% verbatim %}
<div id="app">
    just an app
  {{ message }}
</div>
{% endverbatim %}