Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added django>=2.0 compat #551

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

added django>=2.0 compat #551

wants to merge 3 commits into from

Conversation

g-as
Copy link
Collaborator

@g-as g-as commented Jun 22, 2018

No description provided.

setup.py Outdated
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AGASS007 great!
are you planning to release a new version soon?

TenantModel = get_tenant_model()
all_tenants = TenantModel.objects.all()
values = TenantModel.objects.values_list(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of values_list() why not use only("schema_name", "domain_url")? That way you can still keep the (t.schema_name, t.domain_url,) for t in all_tenants]) because the way youre doing it now, the order can be reversed depending on the python version.

ORIGINAL_BACKEND = getattr(settings, 'ORIGINAL_BACKEND', 'django.db.backends.postgresql_psycopg2')
# Django 1.9+ takes care to rename the default backend to 'django.db.backends.postgresql'
original_backend = django.db.utils.load_backend(ORIGINAL_BACKEND)
original_backend = django.db.utils.load_backend('django.db.backends.postgresql')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can cause issues, i can see the need to not break this, i can come up with a couple scenarios on why you would want to override this.

@gopar
Copy link

gopar commented Jan 18, 2019

Status?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants