[Vuejs]-Integrating a frontend js framework (Vue) for django

0👍

We use Vue with Django via cdn, and it is pretty easy to set up as you can do everything in the template file.

You have to be sure to import Vue via script tag somewhere on the page and then either define your own delimiters (as you’ve done) or use the {% verbatim %} {% endverbatim %} tags around any variables you do not want django to try and evaluate. You can either write your Vue function in a script tag on the page or import an external file via script tag the way you would import any other js file into a django template. If you posted your template code, I might be able to provide more guidance.

Leave a comment