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:

react native's new architecture: sync and async rendering

React Native’s New Architecture: Sync and async rendering

React Native’s New Architecture offers significant performance advantages. In this article, you’ll explore synchronous and asynchronous rendering in React Native through practical use cases.

Emmanuel John
Dec 24, 2024 â‹… 8 min read
Building a Full-Featured Laravel Admin Dashboard with Filament

Building a full-featured Laravel admin dashboard with Filament

Build scalable admin dashboards with Filament and Laravel using Form Builder, Notifications, and Actions for clean, interactive panels.

Kayode Adeniyi
Dec 20, 2024 â‹… 5 min read
Working With URLs In JavaScript

Working with URLs in JavaScript

Break down the parts of a URL and explore APIs for working with them in JavaScript, parsing them, building query strings, checking their validity, etc.

Joe Attardi
Dec 19, 2024 â‹… 6 min read
Lazy Loading Vs. Eager Loading

Lazy loading vs. Eager loading

In this guide, explore lazy loading and error loading as two techniques for fetching data in React apps.

Njong Emy
Dec 18, 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