5

I just start looking at mongo db for the Django backend.

I have few questions .

1.Can i use raw mongo db instead os using Django ORM for the queryset .

2.My application is realted to Electronic health record so somone can add many details somone will not add anything (Basicaaly it should not database field dependent .)Please help me in this case how should I Design my Model . Or Instead of using Model can I directly fetch and data using raw mongo db queries from the Django view ?

I go through some blog post and found it is working somewhat ok .
But . Can I insert some field in the database which is not defined in the Django Model .

Really confuse .

Any help and suggestionn would be appriciated .

4

1 回答 1

7

当您想将 MongoDB 用于 Django 时,您可以采用各种框架。列出了一些您可能会考虑的框架。

您可以直接访问 MangoDB,而无需通过 Django ORM,但最好使用适当的接口。PyMango 和 Ming 等包装器使您能够利用动态行为并提供 API 来保证集合中的数据类型。

选择一个框架将帮助您自信地发展。

PyMango是一个轻量级的包装器,可以为您提供更快的执行速度。但是,如果您正在寻找 ORM,那么MongoEngine或 MongoKit 或 Ming。

于 2013-03-12T11:58:45.600 回答