citusdata / django-multitenant

Python/Django support for distributed multi-tenant databases like Postgres+Citus
MIT License
731 stars 118 forks source link

Unable to import mixins #40

Closed Dineshs91 closed 5 years ago

Dineshs91 commented 5 years ago

I am trying to import mixins in my code.

from django_multitenant.mixins import *

I am getting this error ModuleNotFoundError: No module named 'django_multitenant.mixins'.

Python version: 3.6 Library version: 1.1.0

Dineshs91 commented 5 years ago

This will fix the issue

In file django_multitenant/django_multitenant.py add the following import

from .mixins import TenantManagerMixin, TenantModelMixin
louiseGrandjonc commented 5 years ago

Hi,

We haven't deployed the new version of the django-multitenant library on Pypi. So the django_multitenant.mixins will only be available if you use our master. Is it what you are doing or did you install it using pip?

Dineshs91 commented 5 years ago

@louiseGrandjonc I installed the library using pip. I tried installing from the master branch now and it seems to be working. Thanks for the quick response.

When will the new version be deployed to Pypi ?

louiseGrandjonc commented 5 years ago

I think that I should be able to release the new version on Pypi this week :) I will let you know as soon as it's done

louiseGrandjonc commented 5 years ago

Hi @Dineshs91, I wanted to let you know that the version 2.0.0 of the django-multitenant library has been released.

Dineshs91 commented 5 years ago

Thanks a lot.