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:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 â‹… 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 â‹… 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 â‹… 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 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