News for hackers. Stuff that matters.
Re:PostgREST – Serve a RESTful API from Any Postgres Database by turbobooster on Thursday December 29, 2022 @10:26AM (#34173561)
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?
Re:PostgREST – Serve a RESTful API from Any Postgres Database by sidmitra on Thursday December 29, 2022 @10:34AM (#34173641)
Instead of Vue, have you considered htmx with django-rest-framework? See https://htmx.org/essays/spa-alternative/
Re:PostgREST – Serve a RESTful API from Any Postgres Database by clintonb on Thursday December 29, 2022 @10:33AM (#34173625)
Re:PostgREST – Serve a RESTful API from Any Postgres Database by melony on Thursday December 29, 2022 @10:29AM (#34173591)
Have young'uns these days not heard of ajax?
Re:PostgREST – Serve a RESTful API from Any Postgres Database by umangsh on Thursday December 29, 2022 @10:43AM (#34173739)
DRF (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/lates...) helps share form and serializer objects reducing a lot of duplicate effort.
Re:PostgREST – Serve a RESTful API from Any Postgres Database by AnEro on Thursday December 29, 2022 @11:08AM (#34174044)
I'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