django-multitenant icon indicating copy to clipboard operation
django-multitenant copied to clipboard

Perhaps not full documented: db layer for multitentant

Open ReneFroger opened this issue 3 years ago • 2 comments

In the documentation https://github.com/citusdata/django-multitenant#automating-composite-foreign-keys-at-db-layer it's said that the django.backends.postgresql could be replaced with django_multitenant.backends.postgresqlinENGINEinsettings.py.

But when I do this and run the server, I get the error:

django.core.exceptions.ImproperlyConfigured: 'django_multitenant.db.backends.postgresql' isn't an available database backend or couldn't be imported. Check the above exception. To use one of the built-in backends, use 'django.db.backends.XXX', where XXX is one of:     'mysql', 'oracle', 'postgresql', 'sqlite3'`

Perhaps it's missing an import, but it's not clear which import I should make. So I think it should be explained in the documentation as well?

ReneFroger avatar Jan 23 '22 20:01 ReneFroger

did you install the package? As shown at the top of the documentation:

pip install --no-cache-dir django_multitenant

JelteF avatar Jan 24 '22 09:01 JelteF

Yes, I did. The package is listed in my pip packages list:

$ python -m pip list | grep multi django-multitenant 3.0.0

In both global environment as in Python virtual environment.

ReneFroger avatar Jan 24 '22 09:01 ReneFroger