[Django]-Sprinkling VueJs components into Django templates

0👍

if you want to use someValue inside vue component, you should pass the value by props, you can take a look at this repo django-vue

template index.html you can see how msg0 and msg1 pass into the vue component

index.js

the line {% render_bundle 'index' %} is to include the compiled index.js, defined here

0👍

If you want to use Vue component inside Django, try this tutorial

https://blog.xoxzo.com/2020/08/05/vue-with-django-getting-started/

However if you just want to manipulate Django HTML using Vue, just use the Vue inline-template

Leave a comment