2022-02-17
3171
#django#vue
Rose Chege
93213
Feb 17, 2022 â‹… 11 min read

How to build a Vue.js app with Django REST framework

Rose Chege Rose is a lover of technology and an upright individual who is not afraid to get out of her comfort zone and try out new programming paradigms.

Recent posts:

Understanding Security In React Native Applications

Understanding security in React Native applications

Explore the various security threats facing React Native mobile applications and how to mitigate them.

Wisdom Ekpotu
Mar 27, 2024 â‹… 10 min read
Warp Adoption Guide: Overview, Examples, And Alternatives

warp adoption guide: Overview, examples, and alternatives

The warp web framework for Rust offers many enticing features. Let’s see when and why you should consider using warp in your projects.

Ukeje Goodness
Mar 26, 2024 â‹… 8 min read
Integrating Next Js And Signalr For Enhanced Real Time Web App Capabilities

Integrating Next.js and SignalR to build real-time web apps

In this tutorial, you’ll learn how to integrate Next.js and SignalR to build an enhanced real-time web application.

Clara Ekekenta
Mar 25, 2024 â‹… 8 min read
Exploring Tailwind Oxide

Exploring Tailwind Oxide

Tailwind Oxide was introduced to address common issues that exist with Tailwind CSS, such as the complex setup process.

Marie Starck
Mar 22, 2024 â‹… 5 min read
View all posts

6 Replies to "How to build a Vue.js app with Django REST framework"

    1. I agree something is not right with this tutorial I am not able to post data from vue to django only can with django did yo figure it out thanks Im still trying .

      1. The same, I get some errors too, besides that components in Vue.js must be multi- words. And there are other errors in the tutorial, it seems that some revision was missing.

  1. Thank your for this great tutorial. There are just a few minor errors in it:

    * “from totasks import views” → “from tasks import views”
    * “Navigate to your Postman and enter the URL http://localhost:8000/api/ts/” → “…/api/tasks/”
    * It might be worth mentioning that the use of Vue2 is assumed (it does not work out of the box for Vue3)

  2. Thank you for this great tutorial, it helps a lot! and like @Falko said, a few errors in it, and I add some further:
    * correct Vue3 sentence for main.js error in vue project/src:

    const app = createApp(App)
    app.config.globalProperties.$http = axios;
    app.mount(“#app”)

    (instead of using “Vue.prototype.$http = axios;”)

    * toggle and delete’s js error:

    urls.py in task app (python part)

    path(‘tasks/’, views.task_detail),

    toggeTask method in Tasks.vue in component (Vue part)

    const response = await this.$http.put(`http://localhost:8000/api/tasks/${task.id}`, {

    which means unify the expression end with/without slashes of api’s url pattern.

  3. Hi Nice tutorial its my second time attempting this exact tutorial but when I try to submit data from vue js frontend the submit button is not doing anything the only way for me to submit data is to use django. I thought maybe it was due to vue js version or axios version but I did the exact version you used in this tutorial and am still not able to submit data from the frontend to the backend. Do you have a live example to see it working because I followed your example and sadly it does not work. Thank you I would appreciate your help.

Leave a Reply