News for hackers. Stuff that matters.
Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by 7bit on Sunday March 17, 2024 @06:18AM (#39733291)
Every time I tried to add an API to a Django project by using DRF, I was surprised by the sheer complexity it introduced to get basic things working.

I don't mich like the strict and inflexible DRF approach.

But great that they keep continuing supporting the framework for the people that like and use it. Or just use it.

Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by tc08 on Sunday March 17, 2024 @06:30AM (#39733348)
As someone who has used DRF in many projects over a decade, I 100% agree. In my current project I’m using django-ninja which gives me the power of the Django ecosystem and ORM with the simplicity of FastAPI. This is the way.
Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by stavros on Sunday March 17, 2024 @06:44AM (#39733422)
Is django-ninja maintained? I've always disliked DRF and liked FastAPI, so Ninja was a natural choice, but my team ended up moving away from it because of it being less popular than DRF.
Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by boxed on Sunday March 17, 2024 @08:00AM (#39733848)
I think it's a bad idea to judge tech based on popularity. It just becomes a game of high school fashion drama, instead of getting work done.

Also, I think the comparison is unfair due to the sheer age of DRF. Check out this graph: https://star-history.com/#encode/django-rest-framework&vital... Then click the "align timelines" and you see that ninja is more popular than DRF was at the same age.

Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by ghnws on Sunday March 17, 2024 @08:42AM (#39734099)
>I think it's a bad idea to judge tech based on popularity. It just becomes a game of high school fashion drama, instead of getting work done. I disagree. If one tool is way less popular, you risk it being discontinued. You do not want to start maintaining a web framework on top of your application nor do you want to rewrite your entire app.
Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by boxed on Monday March 18, 2024 @03:19AM (#39741166)
People worry too much about that stuff. You can use non-maintained software for decades just fine. But I see people all the time freak out because there wasn't a release in the last week or whatever.

Also, most business fail way before their chosen framework stops being maintained. In fact, most businesses fail before they even got their first customer, let alone getting to break even. We need to keep some perspective here.

Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by 7bit on Tuesday March 19, 2024 @09:32AM (#39755554)
You assume that popular high school drama OSS is not productive and you don't get work done with it. Your assumption and the point you are making are incorrect.
Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by sebra on Sunday March 17, 2024 @07:04AM (#39733532)
It is very much maintained and got it's 1.0 release not long ago. Sadly there is a single guy doing all the work for Ninja so the tempo of releases varies. I also think there is quite a way to the stability of DRF and DRF's ecosystem. If you want permissions and throttling for example you'll have to use django-ninja-extra which is pretty much "DRF but its Ninja".

For me personally I think the micro approach of Ninja / FastAPI is at odds with what I want out of DRF. I just want to make my crud stuff and not worry about implementing e.g. throttling, etc, on my own.

Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by notanormalnerd on Sunday March 17, 2024 @07:14AM (#39733603)
DRF does what it says on the tin. It is REST by the definition of it. Not a HTTP JSON API but strict REST. A object with CRUD as an API. Everything else is outside of scope and mostly reall hard to do.

That's why I rarely use DRF and either use function based views directly or use another library.

Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by mchicken on Sunday March 17, 2024 @07:01AM (#39733512)
In my experience, it was decent for simple CRUD interfaces, but anything beyond that turned the development into a nightmare.
Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by ic_fly2 on Sunday March 17, 2024 @06:29AM (#39733342)
It’s true that Django and especially DRF feel a bit overkill. But for any app that does actual business the extra bits have often saved my bacon.
Re:Django REST framework: 3.15.0 Release (Django 5.0 support) by btown on Sunday March 17, 2024 @10:42AM (#39734784)
Whenever you have “there is complex business logic that determines how SQL clauses are chained together” the Django ORM is invaluable.