17👍
✅
What glenfant said is easy, but this is even easier.
var app = new Vue({
delimiters: ['{', '}'],
el: '#app',
data: { message: 'Hello Vue!' },
})
That’s all: you configure Vue with the tag it should use to work. 🙂 I use just one brace – {…}
– but you can use doubled square brackets, too: [[
and ]]
.
11👍
Use the verbatim
template tag. https://docs.djangoproject.com/en/1.11/ref/templates/builtins/#verbatim
<div id="app">{% verbatim %}{{ message }}{% endverbatim %}</div>
- ModuleNotFoundError: No module named 'models'
- Using self in Django Model classes
- Django request.POST does not contain the name of the button that submitted the form
- Django Compressor does not minify files
- How to Paginate within an action in Django Rest Framework
0👍
In your base template, you can add this line:
<script>Vue.config.delimiters = ['${', '}'];</script>
Then you will able to use %{...}
for Vue, {{...}}
for django.
- Uncaught ReferenceError: django is not defined
- Pycharm warns package requirement not satisfied when using pipenv to install package
- Use prefetch_related in django_simple_history
- Django, division between two annotate result won't calculate correctly
Source:stackexchange.com