←back to thread

378 points rbanffy | 1 comments | | HN request time: 0.197s | source
Show context
aynyc ◴[] No.46217665[source]
I've been using Django on and off at work for the past few years. I really like it. That being said, I still find its ORM difficult. I understand it now that since it's an opinionated framework, I need to follow Django way of thinking. The main issue is that at work, I have multiple databases from different business units. So I constantly have to figure out a way to deal with multiple databases and their idiosyncrasies. I ended up doing a lot of hand holding by turning off managed, inspectdb and then manually delete tables I don't want to show via website or other reasons. For green webapps we have, django is as good as it gets.
replies(6): >>46217950 #>>46218252 #>>46218271 #>>46218403 #>>46218484 #>>46218923 #
luxcem ◴[] No.46218403[source]
I've been using Django for the last 10+ years, its ORM is good-ish. At some point there was a trend to use sqlalchemy instead but it was not worth the effort. The Manager interface is also quite confusing at first. What I find really great is the migration tool.
replies(1): >>46219674 #
formerly_proven ◴[] No.46219674[source]
Since Django has gained mature native migrations there is a lot less point to using SQLAlchemy in a Django project, though SQLAlchemy is undeniably the superior and far more capable ORM. That should be unsurprising though - sqlalchemy is more code than the entire django package, and sqlalchemy + alembic is roughly five times as many LOC as django.db, and both are similar "density" code.
replies(1): >>46219719 #
1. WD-42 ◴[] No.46219719[source]
Makes sense as sqlalchemy’s docs are also 5x as confusing.