News for hackers. Stuff that matters.
Re:Django 5.0 Is Released by BasilPH on Monday December 04, 2023 @11:40AM (#38519460)
I agree. I would even go so far as to say that if you need an ORM, go with Django. I've wasted too much time adding SQLAlchemy to Flask to get something that is still worse than the Django ORM.
Re:Django 5.0 Is Released by danpalmer on Monday December 04, 2023 @11:56AM (#38519707)
Perhaps, but it depends what you're building. SQLAlchemy is much more capable, so if you need great database control and don't need all the other bits Django is bringing, then I kinda get it.
Re:Django 5.0 Is Released by fbdab103 on Monday December 04, 2023 @01:45PM (#38521259)
+1 to that. Maybe SQLAlchemy is a better product, but being a bolted on solution makes everything about the ORM experience feel worse than using Django. If nothing else, it is not just using Flask+SQLAlchemy, now it is Flask+SQLAlchemy+Alembic. Or maybe, you want the niceties, so it is Flask+SQLAlchemy+Alembic+FlaskMigrate.
Re:Django 5.0 Is Released by BasilPH on Monday December 04, 2023 @02:23PM (#38521836)
Exactly. It's the migration support that I find the best feature of Django, but I keep forgetting about it until I have to migrate with some other ORM.
Re:Django 5.0 Is Released by antod on Monday December 04, 2023 @06:05PM (#38524471)
They way I'd look at it - if your app owns the database and schema, use Django. If your app is connecting into someone else's database or databases (like in enterprises with DBA priesthoods etc), the flexibility of SQLAlchemy can fit better around arbitrary schemas etc.