开发者

One-to-Many in Django with multiple models as target

I'm making a patient database application. Each diagnosis would be filled in a form, which have many types of form. I'm doing this with Django with each form as a model.

However, seems that I cannot join the model to the Patient model. How should I join them?

Note that I'm not restricted to Django's ORM. I can move to CounchDB or other database that can scale to 10k patient records and over 开发者_Python百科100k diagnosis.


scale to 10k patient records and over 100k diagnosis.

This is not a scale to be concerned about. Pretty much anything that can do this, can do this scale.

I'm doing this with Django with each form as a model.

I don't see why that would be necessary. You should rather create dynamic forms (another tutorial) that stores data back to the same model.

Other wise, you should resort to Generic Foreign Keys that are defined in the content type framework.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜