Every once in a while, someone will complain on the Django users mailing list that they feel our ORM doesn’t offer all the features they need, and it’s true that there are a few exotic and/or advanced things that it can’t handle. Usually the standard people compare to is SQLAlchemy which can be, unfortunately, extremely complex to learn and use. A related — and inaccurate — complaint is that it’s possible to use Django with SQLAlchemy, but that you’d lose the admin app (you wouldn’t; using the admin while your own views rely on another ORM, or even another framework entirely, is actually pretty easy).
Either way, both complaints are about to go out the window: a new Django branch, created literally about an hour ago, will add official support for SQLAlchemy as a ‘contrib’ option. According to the plans laid out by Adrian and Robin, the SQLAlchemy compatibility layer will live in django.contrib.sqlalchemy, and you’ll be able to easily choose which ORM your applications use.
Given the increasing popularity of both Django and SQLAlchemy (which I wouldn’t be surprised to see become the gold standard of Python ORMs), I think this is a big win for everybody.
Comments for this entry are closed. If you'd like to share your thoughts on this entry with me, please contact me directly.
This is fantastic news! Can’t wait to see it in action…
indeed! other benefits of using sqlachemy as the orm layer for django: premium oracle support + schema migration. (django’s oracle support exists only as a patch and not 100% reliable at the moment and i am not sure about the schema migration)
Great news! Now I can choose! Now the the only think keeping me from only using Django (Turbogears+SQLAlchemy) is soon going away! Yay!
// F