bernardopires / django-tenant-schemas

Tenant support for Django using PostgreSQL schemas.
https://django-tenant-schemas.readthedocs.org/en/latest/
MIT License
1.45k stars 425 forks source link

Using django-tenant-schema and GeoDjango(Postgis) together. #509

Closed shubhamagarwal003 closed 6 years ago

shubhamagarwal003 commented 6 years ago

I want to use django-tenant-schemas and GeoDjango (PostGIS) in my Django project. I have a single default database. But both django-tenant-schemas and GeoDjango want me to set a custom Engine for the Database in the settings. django-tenant-schemas want it to be set to tenant_schemas.postgresql_backend while GeoDjango wants it to be set to django.contrib.gis.db.backends.postgis.Is there any workaround to this issue?

Guest007 commented 6 years ago

More than one and half year ago :-) in #325

shubhamagarwal003 commented 6 years ago

I did it more simply by changing the ORIGINAL_BACKEND in tenant_schame.postgresql_backend.base I changed it to ORIGINAL_BACKEND = getattr(settings, 'ORIGINAL_BACKEND', 'django.contrib.gis.db.backends.postgis')

from

ORIGINAL_BACKEND = getattr(settings, 'ORIGINAL_BACKEND', 'django.db.backends.postgresql_psycopg2')

dhirajshinde121083 commented 4 years ago

Thanks you very much shubham, you really saved my time