I'm trying to find any information if official django is going to support any noSQL DBMS, especially MongoDB. I found a fork of django 1.3 the django-nonrel (a fork of official django) and some other not very reliable projects (failures occur often, according to comments I found on the web). Is django going to support noSQL officially at all?
问题:
回答1:
Perhaps, there are other ways to achieve your goals, besides going noSQL
.
In short, if you just need dynamic fields, you have other options. I have an extensive writeup about them in another answer:
- Entity–attribute–value model (Django-eav)
- PostgreSQL hstore (Django-hstore)
- Dynamic models based on migrations (Django-mutant)
Yes, that's not exactly what you've asked for, but that's all that we've currently got.
回答2:
As you said, forked code is never the best alternative: changes take longer to get into the fork, it might break things... And even with django-nonrel
, is not really Django as you loose things like model inheritance, M2M... basically anything that will need to do a JOIN
query behind the scenes.
Is Django going to support NoSQL? As far as I know, there's no plans on the roadmap for doing so in the short run. According to Russell Keith-Magee on his talk on PyCon Russia 2013, "NoSQL" is on the roadmap but in the long term, as well as SQLAlchemy. So if you wanna wait, is going to take a long time, I'm afraid.
Anyway, even if it's not ideal, you still can use Django but use something else as a ORM. Nothing stops you from use vanilla Django and something like MongoDB instead of Django ORM.