News for hackers. Stuff that matters.
Re:Django for Startup Founders: A better software architectu... by jtdev on Wednesday June 23, 2021 @02:10PM (#27607903)
Yes, I also found the Django ORM to be absolutely horrendous. The need for using a serializer was also incredibly offputting and the default behavior of said serializers was almost always unhelpful and in fact caused more work than just crafting a JSON (or XML) object as I would do in Flask. Why some developers prefer these awful abstractions is beyond me.
Re:Django for Startup Founders: A better software architectu... by vitorfs on Wednesday June 23, 2021 @08:05PM (#27612220)
I actually like the Django ORM. Something that I learned working with Django 8+ years is that to use its ORM effectively, you have to play Django's game. Sometimes just by denormalizing a few fields will make some queries/relationships way easier.

At work we have a marketplace engine and a digital wallet/financial app built entirely with Django (100k+ loc) and we don't have a single raw SQL query, everything is done with the Django ORM.

Re:Django for Startup Founders: A better software architectu... by PhoenixReborn on Wednesday June 23, 2021 @02:28PM (#27608181)
The ORM works pretty well as long as you only need to do pretty basic CRUD queries, though I do agree that it gets much worse as your queries get more complex.

Serializers are definitely one of the worst parts of DRF. Anecdotally, I used Pydantic (instead of Marshmallow as the author recommends) to get around this.

Re:Django for Startup Founders: A better software architectu... by ensignavenger on Wednesday June 23, 2021 @03:13PM (#27608752)
I use pydantic for serializers in Django too- and recently started experimenting with Django Ninja https://django-ninja.rest-framework.com/ if you haven't seen it already.