4 ms·
I have an old Django web app that needs to go REST since it's coupled withe the front end I now want to use Vue. The problem is the dang views/controllers. I wo
by turbobooster 4y ago
I have an old Django web app that needs to go REST since it's coupled withe the front end I now want to use Vue. The problem is the dang views/controllers. I would have to rewrite those?
- melony 4y agoHave young'uns these days not heard of ajax?
- clintonb 4y agohttps://www.django-rest-framework.org/ https://www.django-rest-framework.org/
- sidmitra 4y agoInstead of Vue, have you considered htmx with django-rest-framework? See https://htmx.org/essays/spa-alternative/ https://htmx.org/essays/spa-alternative/
- umangsh 4y agoDRF (https://www.django-rest-framework.org/ https://www.django-rest-framework.org/) provides a lot of functionality out of the box for REST views. In addition, DRF braces (https://django-rest-framework-braces.readthedocs.io/en/latest/ https://django-rest-framework-braces.readthedocs.io/en/lates...) helps share form and serializer objects reducing a lot of duplicate effort.
- AnEro 4y agoI'd say you could either just use vue + django and have use AJAX to fetch data from your Rest API of a database. Theres ways to handle auth aswell but its annoying. Or just not use vue with this project, personally I think we've overestimated how much interactivity/real time updates are needed in an MVP. I personally prefer to rewrite stuff entirely, cause there is always newer shinier solutions, but I also try to keep my projects small or scrappy because of this* *when it comes to side projects and fun projects that I am the primary user