我想在我的Django项目中使用django-租户模式和GeoDjango (PostGIS)。我只有一个默认数据库。但是django-租户模式和GeoDjango都希望我在设置中为数据库设置一个自定义引擎。
django-租户模式希望将其设置为tenant_schemas.postgresql_backend
而GeoDjango希望将其设置为django.contrib.gis.db.backends.postgis。
这个问题有什么解决办法吗?
编辑:我只想对单个型号使用GeoDjango,并且使用单个Postgres数据库。
发布于 2017-10-31 06:07:02
我解决这个问题的方法是改变ORIGINAL_BACKEND中的tenant_schame.postgresql_backend.base。我把它换成了
ORIGINAL_BACKEND = getattr(settings, 'ORIGINAL_BACKEND', 'django.contrib.gis.db.backends.postgis')从…
ORIGINAL_BACKEND = getattr(settings, 'ORIGINAL_BACKEND', 'django.db.backends.postgresql_psycopg2')https://stackoverflow.com/questions/47016787
复制相似问题