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:

How To Audit And Validate AI-Generated Code Output

How to audit and validate AI-generated code output

Validating and auditing AI-generated code reduces code errors and ensures that code is compliant.

Boemo Mmopelwa
Dec 2, 2024 â‹… 5 min read
Building A Background Remover With Vue And Transformers.js

Building a background remover with Vue and Transformers.js

Build a real-time image background remover in Vue using Transformers.js and WebGPU for client-side processing with privacy and efficiency.

Emmanuel John
Nov 29, 2024 â‹… 9 min read
Managing Search Parameters In Next.js With Nuqs

Managing search parameters in Next.js with nuqs

Optimize search parameter handling in React and Next.js with nuqs for SEO-friendly, shareable URLs and a better user experience.

Jude Miracle
Nov 27, 2024 â‹… 10 min read
React logo over a beige background

Data fetching with Remix’s loader function

Learn how Remix enhances SSR performance, simplifies data fetching, and improves SEO compared to client-heavy React apps.

Abhinav Anshul
Nov 26, 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