How to work around lack of support for foreign keys across databases in Django

后端 未结 9 1356
生来不讨喜
生来不讨喜 2020-12-07 09:59

I know Django does not support foreign keys across multiple databases (originally Django 1.3 docs)

But I\'m looking for a workaround.

What doesn\'t work

9条回答
  •  有刺的猬
    2020-12-07 10:02

    I know that Djano-nosql has support for keys and such though some magic from http://www.allbuttonspressed.com/projects/django-dbindexer. Maybe some of that could help.

    From the description:

    "you can just tell the dbindexer which models and fields should support these queries and it'll take care of maintaining the required indexes for you."

    -Kerry

提交回复
热议问题