mik3y / django-db-multitenant

A simple multi-tenancy solution for Django apps.
Other
155 stars 34 forks source link

Unable to create super user using command shell #18

Closed kamal8 closed 6 years ago

kamal8 commented 7 years ago

I am testing this library for a small project. I am using postgres db. The problem I am facing is that I am unable to create super user from shell. I have specified database in the shell eg. python manage.py createsuperuser --database mydb and then i get the error

django.core.exceptions.ImproperlyConfigured: Tenant name not set at cursor create time.

Since there isn't any comprehensive documentation available for it, I wanted to ask if there is a way to work this out?

UPDATE: I even tried TENANT_NAME=mydb ./manage.my migrate --database=mydb where mydb is the name of tenant and also for the database

stephane commented 6 years ago

If not already solved (old issue), I'll try to test it again this week...

stephane commented 6 years ago

Tested again (from master in waiting for the release) and it works as expected. I hope the new documentation will help you.