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
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
- [Django]-Django Multiple Levels Choices for Field
- [Django]-Django 1.1 equivalent of the 'in' operator
- [Django]-How can I disable/remove authorize button in swagger drf_yasg (maintain CSRF) – django
- [Django]-PHP and Django: Nginx, FastCGI and Green Unicorn?
- [Django]-In Django templates, `Context` is a stack. What for?
Source:stackexchange.com