Skip to content

Commit

Permalink
Merge 4db2778 into ce04c44
Browse files Browse the repository at this point in the history
  • Loading branch information
lorinkoz committed Feb 7, 2022
2 parents ce04c44 + 4db2778 commit d108edf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions django_pgschemas/postgresql_backend/introspection.py
Expand Up @@ -2,10 +2,15 @@
from django.utils.encoding import force_text

from . import _constraints
from .settings import original_backend
from .settings import base_backend, original_backend

try:
DatabaseIntrospection = original_backend.DatabaseIntrospection
except AttributeError:
DatabaseIntrospection = base_backend.DatabaseIntrospection

class DatabaseSchemaIntrospection(original_backend.DatabaseIntrospection): # pragma: no cover

class DatabaseSchemaIntrospection(DatabaseIntrospection): # pragma: no cover
"""
database schema introspection class
"""
Expand Down
4 changes: 3 additions & 1 deletion django_pgschemas/postgresql_backend/settings.py
Expand Up @@ -2,7 +2,9 @@

from django.conf import settings

ORIGINAL_BACKEND = getattr(settings, "PGSCHEMAS_ORIGINAL_BACKEND", "django.db.backends.postgresql")
BASE_BACKEND = "django.db.backends.postgresql"
ORIGINAL_BACKEND = getattr(settings, "PGSCHEMAS_ORIGINAL_BACKEND", BASE_BACKEND)
EXTRA_SEARCH_PATHS = getattr(settings, "PGSCHEMAS_EXTRA_SEARCH_PATHS", [])

base_backend = import_module(BASE_BACKEND + ".base")
original_backend = import_module(ORIGINAL_BACKEND + ".base")

0 comments on commit d108edf

Please sign in to comment.